diff options
author | Vaxry <[email protected]> | 2024-12-19 19:11:07 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-12-19 19:11:15 +0000 |
commit | bec18dc6f943587c23a3e3ec2dc397833e924001 (patch) | |
tree | ba58c9289f038e36311511694c80b3d039f43a12 | |
parent | 5b714f05f87831e3e930af04649f853d5efb9902 (diff) | |
download | Hyprland-bec18dc6f943587c23a3e3ec2dc397833e924001.tar.gz Hyprland-bec18dc6f943587c23a3e3ec2dc397833e924001.zip |
core: fix possible crash on null active workspace
fixes #7822
-rw-r--r-- | src/Compositor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index ba723bdc..5e8c8048 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1097,7 +1097,8 @@ void CCompositor::focusWindow(PHLWINDOW pWindow, SP<CWLSurfaceResource> pSurface const auto PWORKSPACE = pWindow->m_pWorkspace; // This is to fix incorrect feedback on the focus history. PWORKSPACE->m_pLastFocusedWindow = pWindow; - PWORKSPACE->rememberPrevWorkspace(m_pLastMonitor->activeWorkspace); + if (m_pLastMonitor->activeWorkspace) + PWORKSPACE->rememberPrevWorkspace(m_pLastMonitor->activeWorkspace); if (PWORKSPACE->m_bIsSpecialWorkspace) m_pLastMonitor->changeWorkspace(PWORKSPACE, false, true); // if special ws, open on current monitor else if (PMONITOR) |