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

Only uninitialise OpenXR on destruct if it was initialized #59001

Conversation

BastiaanOlij
Copy link
Contributor

The OpenXRInterface is constructed and added to the XRServer to make it available, when destructing it was calling it's uninitialise function to ensure all is cleaned up however if OpenXR was never even enabled that function gave some error spam.

Now only calling it if the OpenXRInterface was previously initialized to ensure it is only run when applicable.

@BastiaanOlij BastiaanOlij added this to the 4.0 milestone Mar 10, 2022
@BastiaanOlij BastiaanOlij requested a review from akien-mga March 10, 2022 23:02
@BastiaanOlij BastiaanOlij self-assigned this Mar 10, 2022
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A paper review of this makes logical sense that we should check if a thing is initialized before uninitializing it.

@fire
Copy link
Member

fire commented Mar 11, 2022

@BastiaanOlij It's a bit weird that you can have OpenXR that is created but uninitialized.

Calling the public function virtual void uninitialize() override; will cause the error spam too. Maybe the check should be inside of uninitialized?

@akien-mga akien-mga merged commit 259114e into godotengine:master Mar 11, 2022
@akien-mga
Copy link
Member

Thanks!

@BastiaanOlij BastiaanOlij deleted the only_uninitialise_openxr_if_initialised branch June 23, 2022 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants