From 871a4f63c718bfe49fbb354a0bb1e46716be5a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 9 Mar 2013 15:46:09 +0100 Subject: [PATCH] app_server: Fixed crash if there is no window. --- src/servers/app/Desktop.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index a5644d7f54..34157c1189 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -1592,7 +1592,7 @@ Desktop::SetWindowWorkspaces(Window* window, uint32 workspaces) /*! \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(). */ void @@ -2117,7 +2117,7 @@ Desktop::RedrawBackground() BRegion redraw; Window* window = CurrentWindows().FirstWindow(); - if (window->Feel() == kDesktopWindowFeel) { + if (window != NULL && window->Feel() == kDesktopWindowFeel) { redraw = window->VisibleContentRegion(); // look for desktop background view, and update its background color @@ -2126,7 +2126,7 @@ Desktop::RedrawBackground() if (view != NULL) view = view->FirstChild(); - while (view) { + while (view != NULL) { if (view->IsDesktopBackground()) { view->SetViewColor(fWorkspaces[fCurrentWorkspace].Color()); break;