summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scene/main/viewport.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 43bdb1395b..e9ea09a3b1 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -3207,7 +3207,9 @@ void Viewport::_update_mouse_over(Vector2 p_pos) {
}
// Send Mouse Enter Self notification.
- gui.mouse_over->notification(Control::NOTIFICATION_MOUSE_ENTER_SELF);
+ if (gui.mouse_over) {
+ gui.mouse_over->notification(Control::NOTIFICATION_MOUSE_ENTER_SELF);
+ }
notify_embedded_viewports = true;
}