desktop/popup: avoid crash on null popup child in rechecking

ref #13352
This commit is contained in:
Vaxry 2026-02-25 23:15:37 +00:00
parent d0583e1761
commit 623185170b
No known key found for this signature in database
GPG key ID: 665806380871D640

View file

@ -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();
}
}