aboutsummaryrefslogtreecommitdiff
path: root/src/ui/host/WindowHost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/host/WindowHost.cpp')
-rw-r--r--src/ui/host/WindowHost.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/host/WindowHost.cpp b/src/ui/host/WindowHost.cpp
index 6849d000..91b5f438 100644
--- a/src/ui/host/WindowHost.cpp
+++ b/src/ui/host/WindowHost.cpp
@@ -53,6 +53,8 @@ bool IsAncestor(controls::Control* control, controls::Control* ancestor) {
// Ancestor at last.
std::vector<controls::Control*> GetAncestorList(controls::Control* control) {
+ if (control == nullptr) return {};
+
std::vector<controls::Control*> l;
while (control != nullptr) {
l.push_back(control);