diff --git a/modules/openxr/openxr_interface.cpp b/modules/openxr/openxr_interface.cpp index b89171543f6..39f9153f0d2 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);