summaryrefslogtreecommitdiff
path: root/src/desktop/view/Window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/desktop/view/Window.cpp')
-rw-r--r--src/desktop/view/Window.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/desktop/view/Window.cpp b/src/desktop/view/Window.cpp
index 70ef2aae..53347722 100644
--- a/src/desktop/view/Window.cpp
+++ b/src/desktop/view/Window.cpp
@@ -576,8 +576,11 @@ void CWindow::onUnmap() {
// if the special workspace now has 0 windows, it will be closed, and this
// window will no longer pass render checks, cuz the workspace will be nuked.
// throw it into the main one for the fadeout.
- if (m_workspace->m_isSpecialWorkspace && m_workspace->getWindows() == 0)
- m_lastWorkspace = m_monitor->activeWorkspaceID();
+ if (m_workspace->m_isSpecialWorkspace && m_workspace->getWindows() == 0) {
+ const auto PMONITOR = m_monitor.lock();
+ if (PMONITOR)
+ m_lastWorkspace = PMONITOR->activeWorkspaceID();
+ }
if (*PCLOSEONLASTSPECIAL && m_workspace && m_workspace->getWindows() == 0 && onSpecialWorkspace()) {
const auto PMONITOR = m_monitor.lock();