diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2026-02-24 12:20:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-24 11:20:29 +0000 |
| commit | 8ab4d1dc06530bbab68e93023d753d0ad8450efe (patch) | |
| tree | 8c47d8be05bb0bb723574fadb4b2ab370b73ea81 /src/desktop/view/Popup.cpp | |
| parent | ae82a55400c1a46c4ac7fda67a679804eb81cce5 (diff) | |
popup: check for expired weak ptr (#13352)
onCommit can destroy popups while the vector CPY still holds a weak ptr
to it, check if the weak ptr is still valid
Diffstat (limited to 'src/desktop/view/Popup.cpp')
| -rw-r--r-- | src/desktop/view/Popup.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/desktop/view/Popup.cpp b/src/desktop/view/Popup.cpp index 722b980a..8832e2b3 100644 --- a/src/desktop/view/Popup.cpp +++ b/src/desktop/view/Popup.cpp @@ -403,7 +403,7 @@ void CPopup::recheckChildrenRecursive() { std::vector<WP<CPopup>> cpy; std::ranges::for_each(m_children, [&cpy](const auto& el) { cpy.emplace_back(el); }); for (auto const& c : cpy) { - if (!c->visible()) + if (!c || !c->visible()) continue; c->onCommit(true); c->recheckChildrenRecursive(); |
