From 8ab4d1dc06530bbab68e93023d753d0ad8450efe Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Tue, 24 Feb 2026 12:20:29 +0100 Subject: [PATCH] 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 --- src/desktop/view/Popup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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> 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();