Merge pull request #92200 from devloglogan/composition-layer-viewport-fix

Allow `OpenXRCompositionLayer` property `layer_viewport` to always be assigned `nullptr`
This commit is contained in:
Rémi Verschelde 2024-05-21 23:19:03 +02:00
commit 4c0d5e59bf
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 1 deletions

View File

@ -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;