aboutsummaryrefslogtreecommitdiff
path: root/src/ui/host/WindowHost.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-16 22:42:34 +0800
committercrupest <crupest@outlook.com>2022-02-16 22:42:34 +0800
commitf75ab0bd662c73d15057d746347d09bf94a992a6 (patch)
tree91efc33de481edf5304001d80b914b69cc0fb338 /src/ui/host/WindowHost.cpp
parent2711b7032cafdc9bdbd6ae06db0325c91e6e7f63 (diff)
downloadcru-f75ab0bd662c73d15057d746347d09bf94a992a6.tar.gz
cru-f75ab0bd662c73d15057d746347d09bf94a992a6.tar.bz2
cru-f75ab0bd662c73d15057d746347d09bf94a992a6.zip
...
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);