diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 3ac9a73f..92c967f0 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -692,10 +692,10 @@ CMonitor* CCompositor::getMonitorFromVector(const Vector2D& point) { } void CCompositor::removeWindowFromVectorSafe(CWindow* pWindow) { - if (windowExists(pWindow) && !pWindow->m_bFadingOut) + if (windowExists(pWindow) && !pWindow->m_bFadingOut) { std::erase_if(m_vWindows, [&](std::unique_ptr& el) { return el.get() == pWindow; }); - - std::erase_if(m_vWindowsFadingOut, [&](CWindow* el) { return el == pWindow; }); + std::erase_if(m_vWindowsFadingOut, [&](CWindow* el) { return el == pWindow; }); + } } bool CCompositor::windowExists(CWindow* pWindow) {