From 9c8d84ed6ca5c086fec3f9b7819b5025d78d8b16 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 16 Nov 2018 09:10:44 -0300 Subject: [PATCH] Get rid of gridmap error due to not yet valid cursor instance, fixes #17546 (cherry picked from commit 8306d60e85269f97e0173a4f7c61bcac46f4087b) --- 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 f523eef8952..a609ced6373 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -770,7 +770,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; }