summaryrefslogtreecommitdiffstats
path: root/modules/openxr
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-05-21 23:19:03 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-05-21 23:19:03 +0200
commit4c0d5e59bfd4aabaeb16739ec8111d12964fdad5 (patch)
treea339562db2604d543b82ba7a1136225a8e00840c /modules/openxr
parent03aa82849d2637f027c2ad3e8af69e27c0aca823 (diff)
parent3d7b712c865cda2866a4536f9bd891aa6408e769 (diff)
downloadredot-engine-4c0d5e59bfd4aabaeb16739ec8111d12964fdad5.tar.gz
Merge pull request #92200 from devloglogan/composition-layer-viewport-fix
Allow `OpenXRCompositionLayer` property `layer_viewport` to always be assigned `nullptr`
Diffstat (limited to 'modules/openxr')
-rw-r--r--modules/openxr/scene/openxr_composition_layer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/openxr/scene/openxr_composition_layer.cpp b/modules/openxr/scene/openxr_composition_layer.cpp
index 50cc7b9e7b..b02f3082ab 100644
--- a/modules/openxr/scene/openxr_composition_layer.cpp
+++ b/modules/openxr/scene/openxr_composition_layer.cpp
@@ -165,7 +165,9 @@ void OpenXRCompositionLayer::set_layer_viewport(SubViewport *p_viewport) {
return;
}
- ERR_FAIL_COND_EDMSG(is_viewport_in_use(p_viewport), RTR("Cannot use the same SubViewport with multiple OpenXR composition layers. Clear it from its current layer first."));
+ if (p_viewport != nullptr) {
+ ERR_FAIL_COND_EDMSG(is_viewport_in_use(p_viewport), RTR("Cannot use the same SubViewport with multiple OpenXR composition layers. Clear it from its current layer first."));
+ }
layer_viewport = p_viewport;