summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-11-09 11:48:12 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-11-09 11:48:12 +0100
commitd1381bbca264794eb3ba470789217ab6f5c91d3f (patch)
tree44730f2c10e784747e531d3ed162e5f8eee6c093
parente769a756402c5118c82c173e8091cb8a799ddd80 (diff)
parent55f7d493eecd51e569193bd132ada213b8924e7f (diff)
downloadredot-engine-d1381bbca264794eb3ba470789217ab6f5c91d3f.tar.gz
Merge pull request #84625 from KoBeWi/yeet_sprite_node()
Remove AnimatedSprite pointer when clearing editor
-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;
}