summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);