summaryrefslogtreecommitdiff
path: root/modules/gridmap/grid_map_editor_plugin.cpp
diff options
context:
space:
mode:
authorPoommetee Ketson <poommetee@protonmail.com>2018-02-27 21:26:39 +0700
committerPoommetee Ketson <poommetee@protonmail.com>2018-02-27 21:26:39 +0700
commit5cf331588a878271645773dd9fd839ed4ab38749 (patch)
treea49b8c15a04bed4dd09e8d59c94727c82151ee84 /modules/gridmap/grid_map_editor_plugin.cpp
parent47676cfa98ffc49a8165b1453bc35a9d261e9c44 (diff)
GridMapEditorPlgn: fix a leak
Diffstat (limited to 'modules/gridmap/grid_map_editor_plugin.cpp')
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 34d51b51e2..a2f48940c4 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -1259,9 +1259,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);