浏览代码

Fix crash when reimporting with Skeleton3D selected.

Saracen 1 年之前
父节点
当前提交
ed083a9fbe
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      editor/plugins/skeleton_3d_editor_plugin.cpp

+ 3 - 1
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;