diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-12-14 18:42:48 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-12-14 18:42:48 +0000 |
| commit | b89a07596e9f1caa353caec13cb328a98b39944c (patch) | |
| tree | fb25ab7f067fde668c8a6af8597331dbd0c6bb22 /src/managers/KeybindManager.cpp | |
| parent | 5a138bed6b421511285557d7b5bc6140bae25713 (diff) | |
prevent moving to invalid workspaces
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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; |
