From e6b6af80bd5399592c782b31c2ebfcd50e58e0c2 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Sun, 7 Apr 2013 03:29:11 -0400 Subject: [PATCH] Fix a crash bug I introduced to Deskbar last commit Need to set fLastClickedItem to NULL so it doesn't point to a deleted item. Sorry about that. --- src/apps/deskbar/ExpandoMenuBar.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/apps/deskbar/ExpandoMenuBar.cpp b/src/apps/deskbar/ExpandoMenuBar.cpp index 2fe97a9a3d..46d0c601ad 100644 --- a/src/apps/deskbar/ExpandoMenuBar.cpp +++ b/src/apps/deskbar/ExpandoMenuBar.cpp @@ -747,11 +747,15 @@ TExpandoMenuBar::RemoveTeam(team_id team, bool partial) BAutolock locker(sMonLocker); // make the update thread wait RemoveItem(i); + if (item == fLastClickedItem) + fLastClickedItem = NULL; delete item; while ((windowItem = dynamic_cast( ItemAt(i))) != NULL) { // Also remove window items (if there are any) RemoveItem(i); + if (windowItem == fLastClickedItem) + fLastClickedItem = NULL; delete windowItem; } SizeWindow(-1);