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:
authorMiika Hamalainen <blender@miikah.org>2013-03-10 23:12:40 +0400
committerMiika Hamalainen <blender@miikah.org>2013-03-10 23:12:40 +0400
commit5a981db3ecfd63f1d09962141b07d968f28aee60 (patch)
tree0e0b012a0a29872e66fb322c9e2a529ca89cf6b2 /source/blender/blenkernel/intern/smoke.c
parent0c93ef3ba95136df3f822066772f5fbed8e696e6 (diff)
Fix [#34561]: Possible smoke crash if smoke flow had lower density than adaptive domain "threshold".
Diffstat (limited to 'source/blender/blenkernel/intern/smoke.c')
-rw-r--r--source/blender/blenkernel/intern/smoke.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index ca3908ab033..435e81556ab 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -1776,6 +1776,8 @@ static void update_flowsfluids(Scene *scene, Object *ob, SmokeDomainSettings *sd
dy = gy - sds->res_min[1];
dz = gz - sds->res_min[2];
d_index = smoke_get_index(dx, sds->res[0], dy, sds->res[1], dz);
+ /* make sure emission cell is inside the new domain boundary */
+ if (dx < 0 || dy < 0 || dz < 0 || dx >= sds->res[0] || dy >= sds->res[1] || dz >= sds->res[2]) continue;
if (sfs->type == MOD_SMOKE_FLOW_TYPE_OUTFLOW) { // outflow
apply_outflow_fields(d_index, density, heat, fuel, react, color_r, color_g, color_b);