svn merge -r 22571:22800 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / source / blender / windowmanager / intern / wm_init_exit.c
index 9a268f8be17ae785a85199f9f767b03d7b5bfe2f..9664c6f28ffda4075a48fb2892c251f480d998b3 100644 (file)
@@ -208,7 +208,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();