diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-05-07 16:50:30 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-05-07 17:37:06 +0100 |
| commit | 598bbd186b1e6e70a01ba7f98c89404531008f15 (patch) | |
| tree | 5c92ad9c30919763b87f1044ff5ca731ee91ace0 /src/desktop/Window.cpp | |
| parent | 6ccc22194ca2d16bd7dc4b7263f897a547c50e6b (diff) | |
window: avoid uaf on updateWindow decos
TODO, make these pointers SP to avoid this in the future.
fixes #5909
Diffstat (limited to 'src/desktop/Window.cpp')
| -rw-r--r-- | src/desktop/Window.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index b4af12f1..00066b27 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -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()); } } |
