1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

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

View File

@@ -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);