소스 검색

Remove AnimatedSprite pointer when clearing editor

kobewi 1 년 전
부모
커밋
55f7d493ee
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;
 	}