desktop/popup: avoid crash on null popup child in rechecking
ref #13352
This commit is contained in:
parent
d0583e1761
commit
623185170b
1 changed files with 6 additions and 2 deletions
|
|
@ -405,8 +405,12 @@ void CPopup::recheckChildrenRecursive() {
|
||||||
for (auto const& c : cpy) {
|
for (auto const& c : cpy) {
|
||||||
if (!c || !c->visible())
|
if (!c || !c->visible())
|
||||||
continue;
|
continue;
|
||||||
c->onCommit(true);
|
|
||||||
c->recheckChildrenRecursive();
|
// keep ref, onCommit can call onDestroy
|
||||||
|
auto x = c.lock();
|
||||||
|
|
||||||
|
x->onCommit(true);
|
||||||
|
x->recheckChildrenRecursive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue