From 55f7d493eecd51e569193bd132ada213b8924e7f Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 8 Nov 2023 18:07:17 +0100 Subject: [PATCH] Remove AnimatedSprite pointer when clearing editor --- editor/plugins/sprite_frames_editor_plugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 01e9eb7a49e..a1241ae6626 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -1322,8 +1322,9 @@ void SpriteFramesEditor::_edit() { void SpriteFramesEditor::edit(Ref p_frames) { _update_stop_icon(); - if (!p_frames.is_valid()) { + if (p_frames.is_null()) { frames.unref(); + _remove_sprite_node(); hide(); return; }