소스 검색

Check for null event in Tree._gui_input to avoid engine crash

Marius Hanl 2 년 전
부모
커밋
09f974b21d
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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();