From 26b6fc89f825d81b6cfc9c8552a2bf230d309532 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 5 Feb 2025 20:35:32 +0100 Subject: [PATCH] Fix crash on shutdown. --- modules/terraman/editor/terrain_world_editor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/terraman/editor/terrain_world_editor.cpp b/modules/terraman/editor/terrain_world_editor.cpp index c2739ce4b..e51732e19 100644 --- a/modules/terraman/editor/terrain_world_editor.cpp +++ b/modules/terraman/editor/terrain_world_editor.cpp @@ -482,6 +482,10 @@ void TerrainWorldEditor::edit(TerrainWorld *p_world) { _gizmo = get_gizmo_from(_world); + if (!_gizmo.is_valid()) { + return; + } + switch (_tool_mode) { case TOOL_MODE_ADD: case TOOL_MODE_REMOVE: