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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-08-26 16:27:22 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-08-26 16:27:22 +0300
commit9cc75bc524bfc80ed992fc97070b4d70011a896a (patch)
treecdd48b1f2353a3c264ea9baa6e1109b904c7ee19 /source/blender/blenkernel/intern/smoke.c
parent3e4a7f4366433842880dc06895d699a54838ad5d (diff)
Fix T44945: Blender crashes when using multiple domains and multiple flow objects with subframes
This is more like a workaround to prevent obvious cases fail, but in theory if some other area will start updating object for subframes blender will crash again. Perhaps proper way to solve this will be to copy objects for subframe updates.
Diffstat (limited to 'source/blender/blenkernel/intern/smoke.c')
-rw-r--r--source/blender/blenkernel/intern/smoke.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 2637969682d..4e2f6edfcdd 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -93,6 +93,8 @@
#ifdef WITH_SMOKE
+static ThreadMutex object_update_lock = BLI_MUTEX_INITIALIZER;
+
#ifdef _WIN32
#include <time.h>
#include <stdio.h>
@@ -2164,7 +2166,9 @@ static void update_flowsfluids(Scene *scene, Object *ob, SmokeDomainSettings *sd
}
else { /* MOD_SMOKE_FLOW_SOURCE_MESH */
/* update flow object frame */
+ BLI_mutex_lock(&object_update_lock);
subframe_updateObject(scene, collob, 1, 5, BKE_scene_frame_get(scene), for_render);
+ BLI_mutex_unlock(&object_update_lock);
/* apply flow */
emit_from_derivedmesh(collob, sds, sfs, &em_temp, sdt);