From 7cecdc0dabe3e04404ea4b248b5516908ebeb879 Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Tue, 2 Jul 2024 11:57:50 +0800 Subject: [PATCH] Fix sprite frame editor crash with null `frames` pounter --- editor/plugins/sprite_frames_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 27056a6cc4c..48087e3166a 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/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;