svn merge -r 22138:22364 https://svn.blender.org/svnroot/bf-blender/branches/blender...
[blender.git] / source / blender / windowmanager / intern / wm_init_exit.c
index 57e028670e71a5672bb0318797afa539ac1986e8..aaa38cee7d8e300382fb1ccfb2ec5f6684b1102e 100644 (file)
@@ -216,7 +216,10 @@ void WM_exit(bContext *C)
        
        fastshade_free_render();        /* shaded view */
        ED_preview_free_dbase();        /* frees a Main dbase, before free_blender! */
-       wm_free_reports(C);                     /* before free_blender! - since the ListBases get freed there */
+
+       if(C && CTX_wm_manager(C))
+               wm_free_reports(C);                     /* before free_blender! - since the ListBases get freed there */
+               
        free_blender();                         /* blender.c, does entire library and spacetypes */
 //     free_matcopybuf();
        free_anim_copybuf();