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
This commit is contained in:
parent
ae82a55400
commit
8ab4d1dc06
1 changed files with 1 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue