Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2011-03-22 16:30:50 +0300
committerJanne Karhu <jhkarh@gmail.com>2011-03-22 16:30:50 +0300
commita69524358bc3fdd2018ad64f79cba9e92f5e0e07 (patch)
tree25609da02d64651e46866e496dc4a7ec9ef9bb1a /source/blender/editors/physics
parentddb9893ca924d3dab195a30049e574d042e1773b (diff)
Bug fix: Fluidsim crashed after clicking "bake" multiple times
* Fluid baking didn't check if there was already an ongoing job before starting a new job.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r--source/blender/editors/physics/physics_fluid.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index f4d31ee5bb5..b2f62f21cf1 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -1081,9 +1081,11 @@ static int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object
static int fluid_bake_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_active_object(C);
+ /* only one bake job at a time */
+ if(WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C)))
+ return 0;
- if(!fluidsimBake(C, op->reports, ob))
+ if(!fluidsimBake(C, op->reports, CTX_data_active_object(C)))
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;