소스 검색

Merge pull request #93846 from jsjtxietian/null-frames

Fix sprite frame editor crash with null `frames` pointer
Rémi Verschelde 1 년 전
부모
커밋
6a13fdcae3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      editor/plugins/sprite_frames_editor_plugin.cpp

+ 1 - 1
editor/plugins/sprite_frames_editor_plugin.cpp

@@ -953,7 +953,7 @@ void SpriteFramesEditor::_sync_animation() {
 }
 }
 
 
 void SpriteFramesEditor::_select_animation(const String &p_name, bool p_update_node) {
 void SpriteFramesEditor::_select_animation(const String &p_name, bool p_update_node) {
-	if (!frames->has_animation(p_name)) {
+	if (frames.is_null() || !frames->has_animation(p_name)) {
 		return;
 		return;
 	}
 	}
 	edited_anim = p_name;
 	edited_anim = p_name;