summaryrefslogtreecommitdiffstats
path: root/modules/openxr/action_map/openxr_interaction_profile.cpp
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2024-07-10 14:41:37 +1000
committerBastiaan Olij <mux213@gmail.com>2024-07-11 20:06:46 +1000
commit95b72631aa78fe5da45a911b59cab2d6f2b76c49 (patch)
tree333dc7d8428a142dae580cac77a7c10df3195b53 /modules/openxr/action_map/openxr_interaction_profile.cpp
parent82cedc83c9069125207c128f9a07ce3d82c317cc (diff)
downloadredot-engine-95b72631aa78fe5da45a911b59cab2d6f2b76c49.tar.gz
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.
Diffstat (limited to 'modules/openxr/action_map/openxr_interaction_profile.cpp')
-rw-r--r--modules/openxr/action_map/openxr_interaction_profile.cpp9
1 files changed, 6 insertions, 3 deletions
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> 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();
}