aboutsummaryrefslogtreecommitdiff
path: root/src/ui/UiHost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/UiHost.cpp')
-rw-r--r--src/ui/UiHost.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/UiHost.cpp b/src/ui/UiHost.cpp
index 09f8fd9b..56ce1eb9 100644
--- a/src/ui/UiHost.cpp
+++ b/src/ui/UiHost.cpp
@@ -365,6 +365,7 @@ void UiHost::UpdateCursor() {
}
Control* UiHost::HitTest(const Point& point) {
- return root_render_object_->HitTest(point)->GetAttachedControl();
+ const auto render_object = root_render_object_->HitTest(point);
+ return render_object ? render_object->GetAttachedControl() : nullptr;
}
} // namespace cru::ui