summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-11-16 09:10:44 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-11-16 09:10:44 -0300
commit8306d60e85269f97e0173a4f7c61bcac46f4087b (patch)
treeeac9859ee82c04618acaa806e92bfc37c7c38bd4
parent0b1e93ccd43815d93de031b4f23fbfcd9ae7a34c (diff)
Get rid of gridmap error due to not yet valid cursor instance, fixes #17546
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index fae88042af..126b49832a 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -802,7 +802,9 @@ void GridMapEditor::edit(GridMap *p_gridmap) {
VisualServer::get_singleton()->instance_set_visible(grid_instance[i], false);
}
- VisualServer::get_singleton()->instance_set_visible(cursor_instance, false);
+ if (cursor_instance.is_valid()) {
+ VisualServer::get_singleton()->instance_set_visible(cursor_instance, false);
+ }
return;
}