소스 검색

Merge pull request #83952 from AThousandShips/popup_crash

Ensure input event is valid in `PopupMenu::activate_item_by_event`
Rémi Verschelde 1 년 전
부모
커밋
cb167fd84c
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      scene/gui/popup_menu.cpp

+ 1 - 0
scene/gui/popup_menu.cpp

@@ -2186,6 +2186,7 @@ void PopupMenu::scroll_to_item(int p_idx) {
 }
 
 bool PopupMenu::activate_item_by_event(const Ref<InputEvent> &p_event, bool p_for_global_only) {
+	ERR_FAIL_COND_V(p_event.is_null(), false);
 	Key code = Key::NONE;
 	Ref<InputEventKey> k = p_event;