Fix crash running in background mode
authorCampbell Barton <ideasman42@gmail.com>
Thu, 12 Jun 2014 15:05:20 +0000 (01:05 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 12 Jun 2014 15:05:56 +0000 (01:05 +1000)
source/blender/windowmanager/intern/wm_init_exit.c

index 5dafadc5a471455282f7f02c0baca0ccdccbc246..675eb5e2e3a992bb22f42667bb70f7c34069cfc9 100644 (file)
@@ -490,9 +490,11 @@ void WM_exit_ext(bContext *C, const bool do_python)
        (void)do_python;
 #endif
 
-       GPU_global_buffer_pool_free();
-       GPU_free_unused_buffers();
-       GPU_extensions_exit();
+       if (!G.background) {
+               GPU_global_buffer_pool_free();
+               GPU_free_unused_buffers();
+               GPU_extensions_exit();
+       }
 
        BKE_reset_undo();