summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-11 08:06:56 +0100
committerGitHub <noreply@github.com>2022-03-11 08:06:56 +0100
commit259114e9e0d5bb01d023ad978e06ed14ca785b1d (patch)
tree45f419620a4bcc56e8925f9ba86df27fbbb103f2
parentaf9a60d5b382c6a8b8d4c1210e71a428d070b12f (diff)
parentd2ef2715ea942b2d763b9186f69359f0c6c856df (diff)
Merge pull request #59001 from BastiaanOlij/only_uninitialise_openxr_if_initialised
Only uninitialise OpenXR on destruct if it was initialized
-rw-r--r--modules/openxr/openxr_interface.cpp5
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);