diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 8ee7f93f5cf..7af43cf2cda 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2948,6 +2948,7 @@ bool Viewport::_sub_windows_forward_input(const Ref &p_event) { void Viewport::push_input(const Ref &p_event, bool p_local_coords) { ERR_MAIN_THREAD_GUARD; ERR_FAIL_COND(!is_inside_tree()); + ERR_FAIL_COND(p_event.is_null()); if (disable_input) { return;