diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 93e9cc58fb3..62effb406d2 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -140,6 +140,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory subdirectory_item->set_collapsed(false); } else if (dname != "res://") { subdirectory_item->get_parent()->remove_child(subdirectory_item); + memdelete(subdirectory_item); } }