Skip to content

Commit

Permalink
Fix two-call idiom bug introduced in 87bd49b.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbucchia committed Apr 30, 2023
1 parent f7e8bac commit b6ccff9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pimax-openxr/space.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ namespace pimax_openxr {
return XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED;
}

if (viewCapacityInput < (viewLocateInfo->viewConfigurationType == XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO
if (viewCapacityInput &&
viewCapacityInput < (viewLocateInfo->viewConfigurationType == XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO
? xr::StereoView::Count
: xr::QuadView::Count)) {
return XR_ERROR_SIZE_INSUFFICIENT;
Expand Down

0 comments on commit b6ccff9

Please sign in to comment.