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
This commit is contained in:
John Scipione
2012-11-12 22:03:25 -05:00
parent 3135d0e0de
commit b4c922197c
+6 -9
View File
@@ -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);