mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-09-11 13:25:42 +03:00
window: avoid uaf on updateWindow decos
TODO, make these pointers SP to avoid this in the future. fixes #5909
This commit is contained in:
parent
6ccc22194c
commit
598bbd186b
@ -211,6 +211,8 @@ void CWindow::updateWindowDecos() {
|
||||
}
|
||||
|
||||
for (auto& wd : decos) {
|
||||
if (std::find_if(m_dWindowDecorations.begin(), m_dWindowDecorations.end(), [wd](const auto& other) { return other.get() == wd; }) == m_dWindowDecorations.end())
|
||||
continue;
|
||||
wd->updateWindow(m_pSelf.lock());
|
||||
}
|
||||
}
|
||||
|
@ -332,6 +332,7 @@ class CWindow {
|
||||
PHLWINDOWREF m_pLastCycledWindow;
|
||||
|
||||
// Window decorations
|
||||
// TODO: make this a SP.
|
||||
std::deque<std::unique_ptr<IHyprWindowDecoration>> m_dWindowDecorations;
|
||||
std::vector<IHyprWindowDecoration*> m_vDecosToRemove;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user