From afe707cc3a3d0185b3b750bc9e907838bbea8e0c Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 30 Mar 2020 15:29:17 +0200 Subject: 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. --- intern/ghost/intern/GHOST_XrSession.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'intern/ghost') 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)); } -- cgit v1.2.3