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:
parent
fef7dd705f
commit
486aaa49f3
@ -1914,8 +1914,10 @@ Desktop::SetFocusWindow(Window* nextFocus)
|
||||
// If the last window having focus is a window that cannot make it
|
||||
// to the front, we use that as the next focus
|
||||
Window* lastFocus = fFocusList.LastWindow();
|
||||
if (!lastFocus->SupportsFront() && _WindowCanHaveFocus(lastFocus))
|
||||
if (lastFocus != NULL && !lastFocus->SupportsFront()
|
||||
&& _WindowCanHaveFocus(lastFocus)) {
|
||||
nextFocus = lastFocus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user