Fix wm leak loading factory-startup

This commit is contained in:
Campbell Barton 2015-09-15 17:43:26 +10:00
parent 07a7d64c06
commit 841202fd06
1 changed files with 2 additions and 0 deletions

View File

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