Browse Source

Fix sprite frame editor crash with null `frames` pounter

jsjtxietian 1 year ago
parent
commit
7cecdc0dab
1 changed files with 1 additions and 1 deletions
  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) {
-	if (!frames->has_animation(p_name)) {
+	if (frames.is_null() || !frames->has_animation(p_name)) {
 		return;
 	}
 	edited_anim = p_name;