Merge pull request #59001 from BastiaanOlij/only_uninitialise_openxr_if_initialised

Only uninitialise OpenXR on destruct if it was initialized
This commit is contained in:
Rémi Verschelde 2022-03-11 08:06:56 +01:00 committed by GitHub
commit 259114e9e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -760,8 +760,9 @@ OpenXRInterface::OpenXRInterface() {
}
OpenXRInterface::~OpenXRInterface() {
// should already have been called but just in case...
uninitialize();
if (is_initialized()) {
uninitialize();
}
if (openxr_api) {
openxr_api->set_xr_interface(nullptr);