From 4c7450a1f6c314fe71768b95067ae5d48cc73811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 4 Feb 2016 11:16:55 +0100 Subject: [PATCH] Add nullptr check in AbstractClient::checkWorkspacePosition for workspace() If a decorated ShellClient is still around after Workspace got destroyed this method is still invoked and can lead to a crash. As we have a workspace initing test there already it makes sense to combine it with a workspace being down check. --- geometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geometry.cpp b/geometry.cpp index 0ba2c6dc88..1bffa9bf8a 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1075,7 +1075,7 @@ void AbstractClient::checkWorkspacePosition(QRect oldGeometry, int oldDesktop, Q // because the window already had its position, and if a window // with a strut altering the workarea would be managed in initialization // after this one, this window would be moved - if (workspace()->initializing()) + if (!workspace() || workspace()->initializing()) return; // If the window was touching an edge before but not now move it so it is again.