mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 16:25:59 +01:00
keybinds: check for null last monitor in changeworkspace (#4077)
This commit is contained in:
parent
4a42344e97
commit
62a8d0be5c
1 changed files with 4 additions and 0 deletions
|
@ -801,6 +801,10 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
static auto* const PWORKSPACECENTERON = &g_pConfigManager->getConfigValuePtr("binds:workspace_center_on")->intValue;
|
static auto* const PWORKSPACECENTERON = &g_pConfigManager->getConfigValuePtr("binds:workspace_center_on")->intValue;
|
||||||
|
|
||||||
const auto PMONITOR = g_pCompositor->m_pLastMonitor;
|
const auto PMONITOR = g_pCompositor->m_pLastMonitor;
|
||||||
|
|
||||||
|
if (!PMONITOR)
|
||||||
|
return;
|
||||||
|
|
||||||
const auto PCURRENTWORKSPACE = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
|
const auto PCURRENTWORKSPACE = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
|
||||||
const bool EXPLICITPREVIOUS = args.starts_with("previous");
|
const bool EXPLICITPREVIOUS = args.starts_with("previous");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue