diff options
| author | ddmetz <77217897+ddmetz@users.noreply.github.com> | 2023-12-06 17:09:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-07 00:09:25 +0000 |
| commit | 62a8d0be5c1959ade8410f8f964e362288f22175 (patch) | |
| tree | 8f914e42fda88c41071b70111ebb358f139532a8 /src/managers/KeybindManager.cpp | |
| parent | 4a42344e9748d2b44c55798ddc3fa41448533c4e (diff) | |
keybinds: check for null last monitor in changeworkspace (#4077)
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index c61ad82e..9bf05a35 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -801,6 +801,10 @@ void CKeybindManager::changeworkspace(std::string args) { static auto* const PWORKSPACECENTERON = &g_pConfigManager->getConfigValuePtr("binds:workspace_center_on")->intValue; const auto PMONITOR = g_pCompositor->m_pLastMonitor; + + if (!PMONITOR) + return; + const auto PCURRENTWORKSPACE = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace); const bool EXPLICITPREVIOUS = args.starts_with("previous"); |
