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)
|
if (fInlineScrollView != NULL)
|
||||||
fInlineScrollView->DetachScrollers();
|
fInlineScrollView->DetachScrollers();
|
||||||
|
|
||||||
if (fExpando != NULL) {
|
|
||||||
SaveExpandedItems();
|
|
||||||
fExpando->RemoveSelf();
|
|
||||||
delete fExpando;
|
|
||||||
fExpando = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fInlineScrollView != NULL) {
|
|
||||||
fInlineScrollView->RemoveSelf();
|
fInlineScrollView->RemoveSelf();
|
||||||
delete fInlineScrollView;
|
delete fInlineScrollView;
|
||||||
fInlineScrollView = NULL;
|
fInlineScrollView = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fExpando != NULL) {
|
||||||
|
SaveExpandedItems();
|
||||||
|
delete fExpando;
|
||||||
|
fExpando = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
BRect screenFrame = (BScreen(Window())).Frame();
|
BRect screenFrame = (BScreen(Window())).Frame();
|
||||||
if (fState == kMiniState) {
|
if (fState == kMiniState) {
|
||||||
SizeWindow(screenFrame);
|
SizeWindow(screenFrame);
|
||||||
|
|||||||
Reference in New Issue
Block a user