Fixes a memory leak in FileSystemDock

Co-authored-by: Rafał Mikrut <mikrutrafal54@gmail.com>
This commit is contained in:
Gilles Roudière 2020-01-15 21:44:43 +01:00
parent 5f99e3396f
commit 76d87e6616

View File

@ -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);
}
}