app_server: Fixed crash if there is no window.
This commit is contained in:
@@ -1592,7 +1592,7 @@ Desktop::SetWindowWorkspaces(Window* window, uint32 workspaces)
|
|||||||
|
|
||||||
|
|
||||||
/*! \brief Adds the window to the desktop.
|
/*! \brief Adds the window to the desktop.
|
||||||
At this point, the window is still hidden and must be shown explicetly
|
At this point, the window is still hidden and must be shown explicitly
|
||||||
via ShowWindow().
|
via ShowWindow().
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
@@ -2117,7 +2117,7 @@ Desktop::RedrawBackground()
|
|||||||
BRegion redraw;
|
BRegion redraw;
|
||||||
|
|
||||||
Window* window = CurrentWindows().FirstWindow();
|
Window* window = CurrentWindows().FirstWindow();
|
||||||
if (window->Feel() == kDesktopWindowFeel) {
|
if (window != NULL && window->Feel() == kDesktopWindowFeel) {
|
||||||
redraw = window->VisibleContentRegion();
|
redraw = window->VisibleContentRegion();
|
||||||
|
|
||||||
// look for desktop background view, and update its background color
|
// look for desktop background view, and update its background color
|
||||||
@@ -2126,7 +2126,7 @@ Desktop::RedrawBackground()
|
|||||||
if (view != NULL)
|
if (view != NULL)
|
||||||
view = view->FirstChild();
|
view = view->FirstChild();
|
||||||
|
|
||||||
while (view) {
|
while (view != NULL) {
|
||||||
if (view->IsDesktopBackground()) {
|
if (view->IsDesktopBackground()) {
|
||||||
view->SetViewColor(fWorkspaces[fCurrentWorkspace].Color());
|
view->SetViewColor(fWorkspaces[fCurrentWorkspace].Color());
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user