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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2016-04-02 05:24:24 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-04-02 14:04:26 +0300
commit74e40663da696ac965349204ef4aa4a47271c431 (patch)
tree59f5338d4a105951818f5a9b8a8cb69704ee3f2a /source/blender/blenkernel/intern/pointcache.c
parentb03ff0bbf8ec33fab734ebd8c61b4410e666f957 (diff)
Fix T47971: rigid body baking crash due to thread race condition.
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index c8a42d81f1d..448aaaa7830 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -3508,15 +3508,13 @@ void BKE_ptcache_quick_cache_all(Main *bmain, Scene *scene)
{
PTCacheBaker baker;
- baker.bake=0;
- baker.pid=NULL;
- baker.render=0;
+ memset(&baker, 0, sizeof(baker));
+ baker.main = bmain;
+ baker.scene = scene;
+ baker.bake = 0;
+ baker.render = 0;
baker.anim_init = 0;
- baker.main=bmain;
- baker.scene=scene;
- baker.quick_step=scene->physics_settings.quick_cache_step;
- baker.update_progress = NULL;
- baker.bake_job = NULL;
+ baker.quick_step = scene->physics_settings.quick_cache_step;
BKE_ptcache_bake(&baker);
}
@@ -3541,7 +3539,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
Scene *sce_iter; /* SETLOOPER macro only */
Base *base;
ListBase pidlist;
- PTCacheID *pid = baker->pid;
+ PTCacheID *pid = &baker->pid;
PointCache *cache = NULL;
float frameleno = scene->r.framelen;
int cfrao = CFRA;
@@ -3552,7 +3550,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
G.is_break = false;
/* set caches to baking mode and figure out start frame */
- if (pid) {
+ if (pid->ob) {
/* cache/bake a single object */
cache = pid->cache;
if ((cache->flag & PTCACHE_BAKED)==0) {