Only uninitialise OpenXR on destruct if it was initialised

This commit is contained in:
Bastiaan Olij 2022-03-11 09:59:04 +11:00
parent 7866c98479
commit d2ef2715ea
1 changed files with 3 additions and 2 deletions

View File

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