Browse Source

Merge pull request #70111 from Maran23/3.x-check-null-event-in-tree

[3.x] Check for null event in Tree._gui_input to avoid engine crash
Rémi Verschelde 2 years ago
parent
commit
607940875c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      scene/gui/tree.cpp

+ 2 - 0
scene/gui/tree.cpp

@@ -2175,6 +2175,8 @@ void Tree::_go_down() {
 }
 
 void Tree::_gui_input(Ref<InputEvent> p_event) {
+	ERR_FAIL_COND(p_event.is_null());
+
 	Ref<InputEventKey> k = p_event;
 
 	bool is_command = k.is_valid() && k->get_command();