diff options
author | Miika Hamalainen <blender@miikah.org> | 2013-03-10 23:12:40 +0400 |
---|---|---|
committer | Miika Hamalainen <blender@miikah.org> | 2013-03-10 23:12:40 +0400 |
commit | 5a981db3ecfd63f1d09962141b07d968f28aee60 (patch) | |
tree | 0e0b012a0a29872e66fb322c9e2a529ca89cf6b2 /source/blender | |
parent | 0c93ef3ba95136df3f822066772f5fbed8e696e6 (diff) |
Fix [#34561]: Possible smoke crash if smoke flow had lower density than adaptive domain "threshold".
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/smoke.c | 2 |
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); |