[Bf-blender-cvs] [afe707cc3a3] master: Fix missing XR space destruction

Julian Eisel noreply at git.blender.org
Tue Mar 31 16:54:29 CEST 2020


Commit: afe707cc3a3d0185b3b750bc9e907838bbea8e0c
Author: Julian Eisel
Date:   Mon Mar 30 15:29:17 2020 +0200
Branches: master
https://developer.blender.org/rBafe707cc3a3d0185b3b750bc9e907838bbea8e0c

Fix missing XR space destruction

I think destructing the XrSession would destruct this anyway, but rather
have this done explicitly, consistently and in a controlled manner.

===================================================================

M	intern/ghost/intern/GHOST_XrSession.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_XrSession.cpp b/intern/ghost/intern/GHOST_XrSession.cpp
index 53d22cbd679..dbe0846a2ca 100644
--- a/intern/ghost/intern/GHOST_XrSession.cpp
+++ b/intern/ghost/intern/GHOST_XrSession.cpp
@@ -76,6 +76,9 @@ GHOST_XrSession::~GHOST_XrSession()
   if (m_oxr->reference_space != XR_NULL_HANDLE) {
     CHECK_XR_ASSERT(xrDestroySpace(m_oxr->reference_space));
   }
+  if (m_oxr->view_space != XR_NULL_HANDLE) {
+    CHECK_XR_ASSERT(xrDestroySpace(m_oxr->view_space));
+  }
   if (m_oxr->session != XR_NULL_HANDLE) {
     CHECK_XR_ASSERT(xrDestroySession(m_oxr->session));
   }



More information about the Bf-blender-cvs mailing list