From f06d4fca27788ca0b1a5ed88caf3884051909c3a Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 29 May 2022 00:07:31 +0200 Subject: [PATCH] Fix one more SIGSEGV while exiting --- src/Compositor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index ed044fc8..eb2c9f92 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -144,6 +144,9 @@ void CCompositor::cleanupExit() { if (!m_sWLDisplay) return; + m_pLastFocus = nullptr; + m_pLastWindow = nullptr; + m_lWorkspaces.clear(); m_lWindows.clear(); @@ -620,6 +623,9 @@ bool CCompositor::doesSeatAcceptInput(wlr_surface* surface) { } bool CCompositor::isWindowActive(CWindow* pWindow) { + if (!m_pLastWindow && !m_pLastFocus) + return false; + if (!windowValidMapped(pWindow)) return false;