Deskbar: Add missing NULL check in SwitchWindow().

All other functions in this file that locate the TTeamGroup via FindTeam()
do a NULL check afterwards, so the fact that this one did not just looks
like an oversight.

Fixes #14457.
This commit is contained in:
Augustin Cavalier 2018-09-08 19:03:06 -04:00
parent dcb5519e5d
commit c392fee262

View File

@ -1098,7 +1098,7 @@ int32
TSwitchManager::CountWindows(int32 groupIndex, bool )
{
TTeamGroup* teamGroup = (TTeamGroup*)fGroupList.ItemAt(groupIndex);
if (!teamGroup)
if (teamGroup == NULL)
return 0;
int32 result = 0;
@ -1146,6 +1146,8 @@ TSwitchManager::SwitchWindow(team_id team, bool, bool activate)
int32 index;
TTeamGroup* teamGroup = FindTeam(team, &index);
if (teamGroup == NULL)
return;
// cycle through the windows in the active application
int32 count;