Merge pull request #93846 from jsjtxietian/null-frames

Fix sprite frame editor crash with null `frames` pointer
This commit is contained in:
Rémi Verschelde 2024-07-03 08:50:29 +02:00
commit 6a13fdcae3
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -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;