浏览代码

Merge pull request #84625 from KoBeWi/yeet_sprite_node()

Remove AnimatedSprite pointer when clearing editor
Rémi Verschelde 1 年之前
父节点
当前提交
d1381bbca2
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      editor/plugins/sprite_frames_editor_plugin.cpp

+ 2 - 1
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;
 	}