OpenXRSamples icon indicating copy to clipboard operation
OpenXRSamples copied to clipboard

Need to check XrResult instead of testing nullptr

Open norlesh opened this issue 4 years ago • 0 comments

at line 255: if (xr_instance == nullptr) at line 328: if (xr_session == nullptr)

both of these lines trigger error code E0042 "operand types are incompatible("..." and "std::nullptr_t") since xr_instance and xr_session are value types that were passed by reference instead of pointers as needed to compare with nullptr. The correct guard for both xrCreateSession() and xrCreateInstance() is to test for XR_SUCCESS.

norlesh avatar Feb 21 '21 04:02 norlesh