Explorar el Código

Merge pull request #35165 from groud/fix_memleak_filesystemdock

Fixes a memory leak in FileSystemDock
Rémi Verschelde hace 5 años
padre
commit
f2d45676c9
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      editor/filesystem_dock.cpp

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