Re-add mouse_focus-nullcheck

This commit is contained in:
Markus Sauermann 2023-06-22 21:58:19 +02:00
parent cb73a6e9f9
commit 60c261ba2d

View File

@ -1771,8 +1771,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
} }
} }
bool stopped = gui.mouse_focus->can_process() && _gui_call_input(gui.mouse_focus, mb); bool stopped = gui.mouse_focus && gui.mouse_focus->can_process() && _gui_call_input(gui.mouse_focus, mb);
if (stopped) { if (stopped) {
set_input_as_handled(); set_input_as_handled();
} }