summaryrefslogtreecommitdiff
path: root/src/desktop/view/Popup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/desktop/view/Popup.cpp')
-rw-r--r--src/desktop/view/Popup.cpp8
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();
}
}