Check if there is still a decorator. Fixes #7894.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42540 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler
2011-08-02 10:56:39 +00:00
parent 27f5d57924
commit 817f7d8003
+2 -1
View File
@@ -2097,7 +2097,8 @@ Window::DetachFromWindowStack(bool ownStackNeeded)
Window* remainingTop = fCurrentStack->TopLayerWindow();
if (remainingTop != NULL) {
decorator->SetDrawingEngine(remainingTop->fDrawingEngine);
if (decorator != NULL)
decorator->SetDrawingEngine(remainingTop->fDrawingEngine);
// propagate focus to the decorator
remainingTop->SetFocus(remainingTop->IsFocus());
remainingTop->SetFeel(remainingTop->Feel());