diff options
| author | Vaxry <vaxry@vaxry.net> | 2026-02-25 23:15:37 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2026-02-25 23:16:16 +0000 |
| commit | 623185170b89c12205e9e093576b9c71118d3f59 (patch) | |
| tree | eca759721eefeca63b1f90122c430bdb30aef15c /src/desktop/view/Popup.cpp | |
| parent | d0583e176151bd037015ae48e3c0c582d94c59da (diff) | |
desktop/popup: avoid crash on null popup child in rechecking
ref #13352
Diffstat (limited to 'src/desktop/view/Popup.cpp')
| -rw-r--r-- | src/desktop/view/Popup.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/desktop/view/Popup.cpp b/src/desktop/view/Popup.cpp index 8832e2b3..f6f681d5 100644 --- a/src/desktop/view/Popup.cpp +++ b/src/desktop/view/Popup.cpp @@ -405,8 +405,12 @@ void CPopup::recheckChildrenRecursive() { for (auto const& c : cpy) { if (!c || !c->visible()) continue; - c->onCommit(true); - c->recheckChildrenRecursive(); + + // keep ref, onCommit can call onDestroy + auto x = c.lock(); + + x->onCommit(true); + x->recheckChildrenRecursive(); } } |
