From 60c261ba2d22c952cde16253184f522a80c56a5b Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Thu, 22 Jun 2023 21:58:19 +0200 Subject: [PATCH] Re-add `mouse_focus`-nullcheck --- scene/main/viewport.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index b395c908439e..f9d02a83fac7 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1771,8 +1771,7 @@ void Viewport::_gui_input_event(Ref 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) { set_input_as_handled(); }