mirror of
https://review.haiku-os.org/haiku
synced 2025-02-07 14:25:58 +01:00
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:
parent
dcb5519e5d
commit
c392fee262
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user