merge from 22606 to 23153
[blender.git] / source / blender / windowmanager / intern / wm_init_exit.c
index 5932e8ccb85de2cdd49c785487743087f459bc77..b2cdddf5b638f19a8908b8bf432540c0d0778685 100644 (file)
@@ -268,6 +268,8 @@ void WM_exit(bContext *C)
 
        CTX_free(C);
        
+       SYS_DeleteSystem(SYS_GetSystem());
+
        if(MEM_get_memory_blocks_in_use()!=0) {
                printf("Error Totblock: %d\n", MEM_get_memory_blocks_in_use());
                MEM_printmemlist();
@@ -284,9 +286,6 @@ void WM_exit(bContext *C)
        }
 #endif 
        
-       
-       SYS_DeleteSystem(SYS_GetSystem());
-       
        exit(G.afbreek==1);
 }