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.
Diff
src/apps/deskbar/Switcher.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -1098,7 +1098,7 @@
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 @@
int32 index;
TTeamGroup* teamGroup = FindTeam(team, &index);
if (teamGroup == NULL)
return;
int32 count;