summaryrefslogtreecommitdiff
path: root/src/desktop/Popup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/desktop/Popup.cpp')
-rw-r--r--src/desktop/Popup.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp
index 7dc8ad53..e7a60af2 100644
--- a/src/desktop/Popup.cpp
+++ b/src/desktop/Popup.cpp
@@ -385,6 +385,9 @@ void CPopup::bfHelper(std::vector<WP<CPopup>> const& nodes, std::function<void(W
nodes2.reserve(nodes.size() * 2);
for (auto const& n : nodes) {
+ if (!n)
+ continue;
+
for (auto const& c : n->m_children) {
nodes2.push_back(c->m_self);
}
@@ -395,6 +398,9 @@ void CPopup::bfHelper(std::vector<WP<CPopup>> const& nodes, std::function<void(W
}
void CPopup::breadthfirst(std::function<void(WP<CPopup>, void*)> fn, void* data) {
+ if (!m_self)
+ return;
+
std::vector<WP<CPopup>> popups;
popups.push_back(m_self);
bfHelper(popups, fn, data);