summaryrefslogtreecommitdiffstats
path: root/modules/openxr/action_map/openxr_interaction_profile.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-07-11 23:16:51 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-07-11 23:16:51 +0200
commitb6434f2ac7a1c22c057cc28022fce6e7b965536d (patch)
treeea2f09f3f20b02c5e333fe250f3f0941169308bc /modules/openxr/action_map/openxr_interaction_profile.cpp
parent383a6e4ef285fddcb0e1cbe28a20332c7e5a815b (diff)
parent95b72631aa78fe5da45a911b59cab2d6f2b76c49 (diff)
downloadredot-engine-b6434f2ac7a1c22c057cc28022fce6e7b965536d.tar.gz
Merge pull request #94158 from BastiaanOlij/fix_action_map
OpenXR: Couple of small fixes on the action map
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();
}