Browse Source

Merge pull request #77064 from brno32/push-input-null-check

Check for null event in Viewport::push_input
Rémi Verschelde 2 years ago
parent
commit
755c61b57a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      scene/main/viewport.cpp

+ 1 - 0
scene/main/viewport.cpp

@@ -2948,6 +2948,7 @@ bool Viewport::_sub_windows_forward_input(const Ref<InputEvent> &p_event) {
 void Viewport::push_input(const Ref<InputEvent> &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;