aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Screen.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index e13c2c6..39bb966 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1409,8 +1409,9 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id,
1409 } else if (ignore_sticky || ! w->isStuck()) { 1409 } else if (ignore_sticky || ! w->isStuck()) {
1410 // fresh windows have workspaceNumber == -1, which leads to 1410 // fresh windows have workspaceNumber == -1, which leads to
1411 // an invalid workspace (unsigned int) 1411 // an invalid workspace (unsigned int)
1412 if (getWorkspace(w->workspaceNumber())) 1412 Workspace* ws = getWorkspace(w->workspaceNumber());
1413 getWorkspace(w->workspaceNumber())->removeWindow(w, true); 1413 if (ws)
1414 ws->removeWindow(w, true);
1414 getWorkspace(wkspc_id)->addWindow(*w); 1415 getWorkspace(wkspc_id)->addWindow(*w);
1415 } 1416 }
1416} 1417}