瀏覽代碼

check for null event in Viewport::push_input

Alex Drozd 2 年之前
父節點
當前提交
a5a1c3a03c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/main/viewport.cpp

+ 1 - 0
scene/main/viewport.cpp

@@ -2904,6 +2904,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) {
 void Viewport::push_input(const Ref<InputEvent> &p_event, bool p_local_coords) {
 	ERR_FAIL_COND(!is_inside_tree());
 	ERR_FAIL_COND(!is_inside_tree());
+	ERR_FAIL_COND(p_event.is_null());
 
 
 	if (disable_input) {
 	if (disable_input) {
 		return;
 		return;