summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorIan Manske <IanManske@pm.me>2022-07-29 10:59:31 -0400
committerIan Manske <IanManske@pm.me>2022-07-29 10:59:31 -0400
commitef2417fbcb66e01bdf164c072081159a32ff944a (patch)
tree15c15bcd0120e5e594c523a05f3a380b1b188d09 /src/managers/KeybindManager.cpp
parentfd999100f0de68ff954d2774d22f4167d6e6bd59 (diff)
Fix crash from moving current workspace to nonexistent (null) monitor.
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index cdc8f93f..b3729509 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -1011,6 +1011,9 @@ void CKeybindManager::moveCurrentWorkspaceToMonitor(std::string args) {
return;
}
+ if (!PMONITOR)
+ return;
+
// get the current workspace
const auto PCURRENTWORKSPACE = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace);