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