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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user