diff options
author | kobewi <kobewi4e@gmail.com> | 2023-11-08 18:07:17 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2023-11-08 18:09:42 +0100 |
commit | 55f7d493eecd51e569193bd132ada213b8924e7f (patch) | |
tree | 75c3921b5fd2b5c5676b67fb0f428d74e68ad9ee | |
parent | 3e7f638d7b574785f521beafaf52a6ad95be016f (diff) | |
download | redot-engine-55f7d493eecd51e569193bd132ada213b8924e7f.tar.gz |
Remove AnimatedSprite pointer when clearing editor
-rw-r--r-- | editor/plugins/sprite_frames_editor_plugin.cpp | 3 |
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; } |