Merge pull request #17079 from Noshyaar/leak2

GridMapEditorPlgn: fix a leak
This commit is contained in:
Rémi Verschelde 2018-03-13 13:44:48 +01:00 committed by GitHub
commit ab03574e4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1269,9 +1269,10 @@ GridMapEditor::~GridMapEditor() {
VisualServer::get_singleton()->free(grid_instance[i]);
if (cursor_instance.is_valid())
VisualServer::get_singleton()->free(cursor_instance);
if (selection_level_instance[i].is_valid()) {
if (selection_level_instance[i].is_valid())
VisualServer::get_singleton()->free(selection_level_instance[i]);
}
if (selection_level_mesh[i].is_valid())
VisualServer::get_singleton()->free(selection_level_mesh[i]);
}
VisualServer::get_singleton()->free(selection_mesh);