Fix wm leak loading factory-startup
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user