summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2026-02-24 12:20:29 +0100
committerGitHub <noreply@github.com>2026-02-24 11:20:29 +0000
commit8ab4d1dc06530bbab68e93023d753d0ad8450efe (patch)
tree8c47d8be05bb0bb723574fadb4b2ab370b73ea81 /src
parentae82a55400c1a46c4ac7fda67a679804eb81cce5 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/desktop/view/Popup.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/desktop/view/Popup.cpp b/src/desktop/view/Popup.cpp
index 722b980a..8832e2b3 100644
--- a/src/desktop/view/Popup.cpp
+++ b/src/desktop/view/Popup.cpp
@@ -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();