From bec18dc6f943587c23a3e3ec2dc397833e924001 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 19 Dec 2024 19:11:07 +0000 Subject: core: fix possible crash on null active workspace fixes #7822 --- src/Compositor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 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) -- cgit v1.2.3