diff --git a/editor/import/3d/scene_import_settings.cpp b/editor/import/3d/scene_import_settings.cpp index 6b741b7dd71..ed3eaa94c1b 100644 --- a/editor/import/3d/scene_import_settings.cpp +++ b/editor/import/3d/scene_import_settings.cpp @@ -117,7 +117,9 @@ class SceneImportSettingsData : public Object { ERR_FAIL_NULL(settings); if (r_option.name == "rest_pose/load_pose") { if (!settings->has("rest_pose/load_pose") || int((*settings)["rest_pose/load_pose"]) != 2) { - (*settings)["rest_pose/external_animation_library"] = Variant(); + if (settings->has("rest_pose/external_animation_library")) { + (*settings)["rest_pose/external_animation_library"] = Variant(); + } } } if (r_option.name == "rest_pose/selected_animation") { @@ -134,7 +136,10 @@ class SceneImportSettingsData : public Object { } } break; case 2: { - Object *res = (*settings)["rest_pose/external_animation_library"]; + Object *res = nullptr; + if (settings->has("rest_pose/external_animation_library")) { + res = (*settings)["rest_pose/external_animation_library"]; + } Ref anim(res); Ref library(res); if (anim.is_valid()) {