Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/xr/intern/wm_xr.c')
-rw-r--r--source/blender/windowmanager/xr/intern/wm_xr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/windowmanager/xr/intern/wm_xr.c b/source/blender/windowmanager/xr/intern/wm_xr.c
index 3091a3a19f1..4877addbb77 100644
--- a/source/blender/windowmanager/xr/intern/wm_xr.c
+++ b/source/blender/windowmanager/xr/intern/wm_xr.c
@@ -115,7 +115,6 @@ bool wm_xr_init(wmWindowManager *wm)
void wm_xr_exit(wmWindowManager *wm)
{
if (wm->xr.runtime != NULL) {
- WM_xr_actionmaps_clear(wm->xr.runtime);
wm_xr_runtime_data_free(&wm->xr.runtime);
}
if (wm->xr.session_settings.shading.prop) {
@@ -166,6 +165,10 @@ void wm_xr_runtime_data_free(wmXrRuntimeData **runtime)
/* Prevent recursive GHOST_XrContextDestroy() call by NULL'ing the context pointer before the
* first call, see comment above. */
(*runtime)->context = NULL;
+
+ wm_xr_session_data_free(&(*runtime)->session_state);
+ WM_xr_actionmaps_clear(*runtime);
+
GHOST_XrContextDestroy(context);
}
MEM_SAFE_FREE(*runtime);