diff --git a/src/Window.cpp b/src/Window.cpp index c63209a0..4c8ff509 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -194,7 +194,14 @@ void CWindow::updateWindowDecos() { m_vDecosToRemove.clear(); + // make a copy because updateWindow can remove decos. + std::vector decos; + for (auto& wd : m_dWindowDecorations) { + decos.push_back(wd.get()); + } + + for (auto& wd : decos) { wd->updateWindow(this); } }