mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 15:11:57 -07:00
fix crash in setActiveMonitor null
This commit is contained in:
@@ -1992,6 +1992,11 @@ void CCompositor::setActiveMonitor(CMonitor* pMonitor) {
|
|||||||
if (m_pLastMonitor == pMonitor)
|
if (m_pLastMonitor == pMonitor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!pMonitor) {
|
||||||
|
m_pLastMonitor = nullptr;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
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->m_szName});
|
||||||
|
Reference in New Issue
Block a user