Skip to content

Commit

Permalink
Merge pull request #78582 from Sauermann/fix-mouse-focus-nullcheck
Browse files Browse the repository at this point in the history
Re-add `mouse_focus`-nullcheck
  • Loading branch information
akien-mga authored Jun 22, 2023
2 parents cb73a6e + 60c261b commit b0c3c00
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
set_input_as_handled();
}
Expand Down

0 comments on commit b0c3c00

Please sign in to comment.