From b4c922197ca723c35514a76d8f668f8de8429f4e Mon Sep 17 00:00:00 2001 From: John Scipione Date: Mon, 12 Nov 2012 20:33:18 -0500 Subject: [PATCH] Fix Deskbar crash when scroll arrows are removed. fExpando is added and removed from InlineScrollView only and it is created and destroyed in BarView only. Before this there was a case where it was removed in both InlineScrollView and BarView causing a crash from the double remove --- src/apps/deskbar/BarView.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/apps/deskbar/BarView.cpp b/src/apps/deskbar/BarView.cpp index 2e88320efa..91d22c0115 100644 --- a/src/apps/deskbar/BarView.cpp +++ b/src/apps/deskbar/BarView.cpp @@ -445,20 +445,17 @@ TBarView::PlaceApplicationBar() { if (fInlineScrollView != NULL) fInlineScrollView->DetachScrollers(); - - if (fExpando != NULL) { - SaveExpandedItems(); - fExpando->RemoveSelf(); - delete fExpando; - fExpando = NULL; - } - - if (fInlineScrollView != NULL) { fInlineScrollView->RemoveSelf(); delete fInlineScrollView; fInlineScrollView = NULL; } + if (fExpando != NULL) { + SaveExpandedItems(); + delete fExpando; + fExpando = NULL; + } + BRect screenFrame = (BScreen(Window())).Frame(); if (fState == kMiniState) { SizeWindow(screenFrame);