fix rare crash

This commit is contained in:
vaxerski 2022-04-26 17:51:00 +02:00
parent cabab409e6
commit d35019f185

View file

@ -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();