Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / source / blender / windowmanager / intern / wm_init_exit.c
index 9a268f8..ee826d5 100644 (file)
@@ -266,8 +266,6 @@ 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,6 +282,9 @@ void WM_exit(bContext *C)
        }
 #endif 
        
+       
+       SYS_DeleteSystem(SYS_GetSystem());
+       
        exit(G.afbreek==1);
 }