From b89a07596e9f1caa353caec13cb328a98b39944c Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 14 Dec 2022 18:42:48 +0000 Subject: [PATCH] prevent moving to invalid workspaces --- src/managers/KeybindManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index a71b040e..388a1df4 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -888,6 +888,11 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) { std::string workspaceName; const auto WORKSPACEID = getWorkspaceIDFromString(args, workspaceName); + if (WORKSPACEID == INT_MAX) { + Debug::log(LOG, "Invalid workspace in moveActiveToWorkspace"); + return; + } + if (WORKSPACEID == PWINDOW->m_iWorkspaceID) { Debug::log(LOG, "Not moving to workspace because it didn't change."); return;