diff options
author | Bastiaan Olij <mux213@gmail.com> | 2022-03-11 09:59:04 +1100 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2022-03-11 09:59:04 +1100 |
commit | d2ef2715ea942b2d763b9186f69359f0c6c856df (patch) | |
tree | 36fbcf5e8e6b61e06bdffe773135273e2725635c | |
parent | 7866c984798de62cbb9028f3d1eee947809e0aa9 (diff) |
Only uninitialise OpenXR on destruct if it was initialised
-rw-r--r-- | modules/openxr/openxr_interface.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/openxr/openxr_interface.cpp b/modules/openxr/openxr_interface.cpp index b89171543f..39f9153f0d 100644 --- a/modules/openxr/openxr_interface.cpp +++ b/modules/openxr/openxr_interface.cpp @@ -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); |