Check to make sure lastFocus is not NULL before using it.
This prevents an app_server crash on startup for me most likely introduced in hrev45252. (Just a few commits ago)
This commit is contained in:
@@ -1914,8 +1914,10 @@ Desktop::SetFocusWindow(Window* nextFocus)
|
|||||||
// If the last window having focus is a window that cannot make it
|
// If the last window having focus is a window that cannot make it
|
||||||
// to the front, we use that as the next focus
|
// to the front, we use that as the next focus
|
||||||
Window* lastFocus = fFocusList.LastWindow();
|
Window* lastFocus = fFocusList.LastWindow();
|
||||||
if (!lastFocus->SupportsFront() && _WindowCanHaveFocus(lastFocus))
|
if (lastFocus != NULL && !lastFocus->SupportsFront()
|
||||||
|
&& _WindowCanHaveFocus(lastFocus)) {
|
||||||
nextFocus = lastFocus;
|
nextFocus = lastFocus;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user