From d57be742ff5b9e94fb923f72f481090cf4896a3d Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 17 Jan 2023 13:00:43 +0200 Subject: [PATCH] effects/diminactive: Ensure that m_activeWindow is always reset As the FIXME comment says, a window can be deleted without prior windowClosed signal. BUG: 442222 --- src/effects/diminactive/diminactive.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/effects/diminactive/diminactive.cpp b/src/effects/diminactive/diminactive.cpp index 88d27324d0..f89b4fa44b 100644 --- a/src/effects/diminactive/diminactive.cpp +++ b/src/effects/diminactive/diminactive.cpp @@ -369,6 +369,9 @@ void DimInactiveEffect::windowDeleted(EffectWindow *w) // gets destroyed immediately. So, we have to remove active transitions // for that window here, otherwise we'll crash in postPaintScreen. m_transitions.remove(w); + if (m_activeWindow == w) { + m_activeWindow = nullptr; + } } void DimInactiveEffect::activeFullScreenEffectChanged()