Merge branch 'master' into blender2.8
[blender.git] / source / blender / windowmanager / intern / wm.c
index af275394fcbc30bab3ed3abbe7ad9988b091fada..da1b5feea3df455c00f805abf438566bed832cf6 100644 (file)
@@ -485,13 +485,12 @@ 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, true);
+               BKE_libblock_free_data(&wm->id, true);
                MEM_freeN(wm);
        }
 }