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/intern/wm_files.c')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index a5ebf988edd..24a3b58fc26 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -204,6 +204,18 @@ static void wm_window_match_init(bContext *C, ListBase *wmlist)
WM_event_remove_handlers(C, &win->modalhandlers);
ED_screen_exit(C, win, WM_window_get_active_screen(win));
}
+
+ /* Free XR actionconfigs and motion capture objects. */
+ XrSessionSettings *xrsettings = &wm->xr.session_settings;
+ XrActionConfig *actionconf;
+ while ((actionconf = BLI_pophead(&xrsettings->actionconfigs))) {
+ WM_xr_actionconfig_free(actionconf);
+ }
+ xrsettings->defaultconf = NULL;
+ xrsettings->addonconf = NULL;
+ xrsettings->userconf = NULL;
+
+ BLI_freelistN(&xrsettings->mocap_objects);
}
/* reset active window */