Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to check XrResult instead of testing nullptr #2

Open
norlesh opened this issue Feb 21, 2021 · 0 comments
Open

Need to check XrResult instead of testing nullptr #2

norlesh opened this issue Feb 21, 2021 · 0 comments

Comments

@norlesh
Copy link

norlesh commented Feb 21, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant