Fix crash when hiding a Control during mouse-entering
gui.mouse_over can be set to `nullptr` in the `NOTIFICATION_MOUSE_ENTER`- user-callback a few lines above. This case was previously not handled.
This commit is contained in:
parent
ce3bac5f55
commit
3de9afc4a9
1 changed files with 3 additions and 1 deletions
|
@ -3207,7 +3207,9 @@ void Viewport::_update_mouse_over(Vector2 p_pos) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send Mouse Enter Self notification.
|
// Send Mouse Enter Self notification.
|
||||||
|
if (gui.mouse_over) {
|
||||||
gui.mouse_over->notification(Control::NOTIFICATION_MOUSE_ENTER_SELF);
|
gui.mouse_over->notification(Control::NOTIFICATION_MOUSE_ENTER_SELF);
|
||||||
|
}
|
||||||
|
|
||||||
notify_embedded_viewports = true;
|
notify_embedded_viewports = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue