diff options
author | devloglogan <devloglogan@gmail.com> | 2024-05-21 07:52:40 -0500 |
---|---|---|
committer | devloglogan <devloglogan@gmail.com> | 2024-05-21 07:52:40 -0500 |
commit | 3d7b712c865cda2866a4536f9bd891aa6408e769 (patch) | |
tree | 3b32b9e8176c24bffc1c659b75d2da8264c392cb /modules/openxr | |
parent | 40b4130c93d08235a60996d29e5869a22b6ae53d (diff) | |
download | redot-engine-3d7b712c865cda2866a4536f9bd891aa6408e769.tar.gz |
Allow OpenXRCompositionLayer property layer_viewport to be assigned to nullptr
Diffstat (limited to 'modules/openxr')
-rw-r--r-- | modules/openxr/scene/openxr_composition_layer.cpp | 4 |
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; |