Get rid of gridmap error due to not yet valid cursor instance, fixes #17546

(cherry picked from commit 8306d60e85)
This commit is contained in:
Juan Linietsky 2018-11-16 09:10:44 -03:00 committed by Rémi Verschelde
parent 586b73adf7
commit 9c8d84ed6c
1 changed files with 3 additions and 1 deletions

View File

@ -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(grid_instance[i], false);
} }
if (cursor_instance.is_valid()) {
VisualServer::get_singleton()->instance_set_visible(cursor_instance, false); VisualServer::get_singleton()->instance_set_visible(cursor_instance, false);
}
return; return;
} }