diff options
Diffstat (limited to 'source/blender/windowmanager/xr/intern/wm_xr.c')
-rw-r--r-- | source/blender/windowmanager/xr/intern/wm_xr.c | 4 |
1 files changed, 3 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..cffe14a2146 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,9 @@ 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_actionmaps_clear(*runtime); + GHOST_XrContextDestroy(context); } MEM_SAFE_FREE(*runtime); |