From d35019f185bbc5dc3e7cbc8faf2d72aa39643d90 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 26 Apr 2022 17:51:00 +0200 Subject: [PATCH] fix rare crash --- src/Compositor.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 56e8e8ffd..a5eb998e4 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -622,8 +622,11 @@ void CCompositor::moveWindowToTop(CWindow* pWindow) { void CCompositor::cleanupWindows() { for (auto& w : m_lWindowsFadingOut) { - if (!w->m_bFadingOut || w->m_fAlpha.fl() == 0.f) { - if (!w->m_bReadyToDelete) + + bool valid = windowValidMapped(w); + + if (!valid || !w->m_bFadingOut || w->m_fAlpha.fl() == 0.f) { + if (valid && !w->m_bReadyToDelete) continue; g_pHyprOpenGL->m_mWindowFramebuffers[w].release();