浏览代码

Merge pull request #85284 from Sauermann/fix-enter-hide

Fix crash when hiding a Control during mouse-entering
Rémi Verschelde 1 年之前
父节点
当前提交
066e7d483a
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      scene/main/viewport.cpp

+ 3 - 1
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;
 		}