compositor: check for pworkspace validity in setActiveMonitor

This commit is contained in:
Vaxry 2024-02-22 15:12:51 +00:00
parent 94aeb06d6b
commit c4283abb9f

View file

@ -2616,7 +2616,7 @@ void CCompositor::setActiveMonitor(CMonitor* pMonitor) {
const auto PWORKSPACE = getWorkspaceByID(pMonitor->activeWorkspace); const auto PWORKSPACE = getWorkspaceByID(pMonitor->activeWorkspace);
g_pEventManager->postEvent(SHyprIPCEvent{"focusedmon", pMonitor->szName + "," + PWORKSPACE->m_szName}); g_pEventManager->postEvent(SHyprIPCEvent{"focusedmon", pMonitor->szName + "," + (PWORKSPACE ? PWORKSPACE->m_szName : "?")});
EMIT_HOOK_EVENT("focusedMon", pMonitor); EMIT_HOOK_EVENT("focusedMon", pMonitor);
m_pLastMonitor = pMonitor; m_pLastMonitor = pMonitor;
} }