From ed083a9fbee3153ef6595a3e9a36609f0f0659ae Mon Sep 17 00:00:00 2001 From: Saracen Date: Wed, 25 Oct 2023 20:53:48 +0100 Subject: [PATCH] Fix crash when reimporting with Skeleton3D selected. --- editor/plugins/skeleton_3d_editor_plugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 20b91d8bfde..eeefd1c90da 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -871,7 +871,9 @@ void Skeleton3DEditor::_notification(int p_what) { skeleton->disconnect("pose_updated", callable_mp(this, &Skeleton3DEditor::_update_properties)); skeleton->set_transform_gizmo_visible(true); #endif - handles_mesh_instance->get_parent()->remove_child(handles_mesh_instance); + if (handles_mesh_instance->get_parent()) { + handles_mesh_instance->get_parent()->remove_child(handles_mesh_instance); + } } edit_mode_toggled(false); } break;