mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 09:45:58 +01:00
window: prevent vector modification segfault while iterating
oops, updateWindow can modify the vec
This commit is contained in:
parent
335506d555
commit
0c28d4e334
1 changed files with 7 additions and 0 deletions
|
@ -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 a new issue