Deskbar: Check if window is NULL. Fixes #9860
It is possible, through the right combination of steps, for this method to be run on startup before the view is attached to the window causing a crash because Window() returns NULL. This fix returns false in this case instead. Later, when an application such as Tracker is started and added to Deskbar this method will be run again with the view attached to the window.
This commit is contained in:
parent
ddc2a758e6
commit
f47bef09a2
@ -865,6 +865,9 @@ bool
|
||||
TExpandoMenuBar::CheckForSizeOverrun()
|
||||
{
|
||||
if (fVertical) {
|
||||
if (Window() == NULL)
|
||||
return false;
|
||||
|
||||
BRect screenFrame = (BScreen(Window())).Frame();
|
||||
return Window()->Frame().bottom > screenFrame.bottom;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user