mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-09 23:45:58 +01:00
fix crash in setActiveMonitor null
This commit is contained in:
parent
5327565b33
commit
b0f95c63c9
1 changed files with 5 additions and 0 deletions
|
@ -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});
|
||||||
|
|
Loading…
Reference in a new issue