The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

st/oxr: Fix crash getting ref space bounds in headless mode

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2354>

authored by

Rylie Pavlik and committed by
Marge Bot
0ca2ddd9 e8074ec3

+7
+7
src/xrt/state_trackers/oxr/oxr_space.c
··· 186 186 187 187 enum xrt_reference_space_type reference_space_type = xr_ref_space_to_xrt(referenceSpaceType); 188 188 189 + if (xc == NULL) { 190 + // Headless mode 191 + // `bounds` must be set to 0 on XR_SPACE_BOUNDS_UNAVAILABLE 192 + *bounds = (XrExtent2Df){0}; 193 + return XR_SPACE_BOUNDS_UNAVAILABLE; 194 + } 195 + 189 196 xrt_result_t xret = xrt_comp_get_reference_bounds_rect(xc, reference_space_type, (struct xrt_vec2 *)bounds); 190 197 if (xret == XRT_SPACE_BOUNDS_UNAVAILABLE || xret == XRT_ERROR_NOT_IMPLEMENTED) { 191 198 // `bounds` must be set to 0 on XR_SPACE_BOUNDS_UNAVAILABLE