Skip to content

Commit

Permalink
Merge pull request #92200 from devloglogan/composition-layer-viewport…
Browse files Browse the repository at this point in the history
…-fix

Allow `OpenXRCompositionLayer` property `layer_viewport` to always be assigned `nullptr`
  • Loading branch information
akien-mga committed May 21, 2024
2 parents 03aa828 + 3d7b712 commit 4c0d5e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/openxr/scene/openxr_composition_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4c0d5e5

Please sign in to comment.