From 0f8712ed64e0b8c81cbbaa38e76edca4ffd422be Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 31 May 2022 18:47:32 +0200 Subject: [PATCH] fix crash in moveWorkspaceToMonitor --- src/managers/KeybindManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index e931f716e..a59fbad61 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -775,6 +775,11 @@ void CKeybindManager::moveWorkspaceToMonitor(std::string args) { const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(WORKSPACEID); + if (!PWORKSPACE) { + Debug::log(ERR, "moveWorkspaceToMonitor workspace doesn't exist!"); + return; + } + g_pCompositor->moveWorkspaceToMonitor(PWORKSPACE, PMONITOR); }