summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 01e9eb7a49..a1241ae662 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<SpriteFrames> p_frames) {
_update_stop_icon();
- if (!p_frames.is_valid()) {
+ if (p_frames.is_null()) {
frames.unref();
+ _remove_sprite_node();
hide();
return;
}