From 95b72631aa78fe5da45a911b59cab2d6f2b76c49 Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Wed, 10 Jul 2024 14:41:37 +1000 Subject: Couple of small fixes on the action map: now saves when CTRL-S is pressed/project is run, no longer looses content if OpenXR is not enabled, and a small documentation fix. --- modules/openxr/action_map/openxr_interaction_profile.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'modules/openxr/action_map/openxr_interaction_profile.cpp') diff --git a/modules/openxr/action_map/openxr_interaction_profile.cpp b/modules/openxr/action_map/openxr_interaction_profile.cpp index 2579697d05..1266457113 100644 --- a/modules/openxr/action_map/openxr_interaction_profile.cpp +++ b/modules/openxr/action_map/openxr_interaction_profile.cpp @@ -127,9 +127,12 @@ Ref OpenXRInteractionProfile::new_profile(const char * void OpenXRInteractionProfile::set_interaction_profile_path(const String p_input_profile_path) { OpenXRInteractionProfileMetadata *pmd = OpenXRInteractionProfileMetadata::get_singleton(); - ERR_FAIL_NULL(pmd); - - interaction_profile_path = pmd->check_profile_name(p_input_profile_path); + if (pmd) { + interaction_profile_path = pmd->check_profile_name(p_input_profile_path); + } else { + // OpenXR module not enabled, ignore checks. + interaction_profile_path = p_input_profile_path; + } emit_changed(); } -- cgit v1.2.3