mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-09-11 13:25:42 +03:00
keybinds: check for null last monitor in changeworkspace (#4077)
This commit is contained in:
parent
4a42344e97
commit
62a8d0be5c
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user