From 8306d60e85269f97e0173a4f7c61bcac46f4087b Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 16 Nov 2018 09:10:44 -0300 Subject: Get rid of gridmap error due to not yet valid cursor instance, fixes #17546 --- modules/gridmap/grid_map_editor_plugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3