From 841202fd0689f7ce6e562a701029b2a9efdda33b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 15 Sep 2015 17:43:26 +1000 Subject: Fix wm leak loading factory-startup --- source/blender/windowmanager/intern/wm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index c8ff6dac754..fe92d80c1bd 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -467,11 +467,13 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm) void wm_close_and_free_all(bContext *C, ListBase *wmlist) { + Main *bmain = CTX_data_main(C); wmWindowManager *wm; while ((wm = wmlist->first)) { wm_close_and_free(C, wm); BLI_remlink(wmlist, wm); + BKE_libblock_free_data(bmain, &wm->id); MEM_freeN(wm); } } -- cgit v1.2.3