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.
This commit is contained in:
Julian Eisel 2020-03-30 15:29:17 +02:00
parent b0bd9b4c70
commit afe707cc3a
1 changed files with 3 additions and 0 deletions

View File

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