diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-05-18 12:10:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-05-18 12:10:05 +0400 |
commit | 496be8244ef62868fd7345f06bea05febd912281 (patch) | |
tree | bfc6e5f21fffdf452f14ecec7d03e24b3ad83ada /source/blender/editors/physics/physics_pointcache.c | |
parent | 9862d29a9b665f7f51f2b8a8c56a42f68c9da2d7 (diff) |
fix for crash baking in background mode.
Diffstat (limited to 'source/blender/editors/physics/physics_pointcache.c')
-rw-r--r-- | source/blender/editors/physics/physics_pointcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c index 689e51339f9..5ebbb00939e 100644 --- a/source/blender/editors/physics/physics_pointcache.c +++ b/source/blender/editors/physics/physics_pointcache.c @@ -89,7 +89,7 @@ void bake_console_progress_end(void *arg) static int ptcache_bake_all_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); - wmWindow *win = CTX_wm_window(C); + wmWindow *win = G.background ? NULL : CTX_wm_window(C); PTCacheBaker baker; @@ -171,7 +171,7 @@ void PTCACHE_OT_free_bake_all(wmOperatorType *ot) static int ptcache_bake_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - wmWindow *win = CTX_wm_window(C); + wmWindow *win = G.background ? NULL : CTX_wm_window(C); PointerRNA ptr= CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache); Object *ob= ptr.id.data; PointCache *cache= ptr.data; |