mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-10-30 14:01:40 +00:00
window: prevent vector modification segfault while iterating
oops, updateWindow can modify the vec
This commit is contained in:
parent
335506d555
commit
0c28d4e334
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user