window: prevent vector modification segfault while iterating

oops, updateWindow can modify the vec
This commit is contained in:
Vaxry 2024-03-10 16:56:32 +00:00
parent 335506d555
commit 0c28d4e334

View File

@ -194,7 +194,14 @@ void CWindow::updateWindowDecos() {
m_vDecosToRemove.clear();
// make a copy because updateWindow can remove decos.
std::vector<IHyprWindowDecoration*> decos;
for (auto& wd : m_dWindowDecorations) {
decos.push_back(wd.get());
}
for (auto& wd : decos) {
wd->updateWindow(this);
}
}