Fix [#36827] 2.69 bug with smoke domain, particle emitter and a force field causes...
authorBastien Montagne <montagne29@wanadoo.fr>
Sat, 28 Sep 2013 05:06:02 +0000 (05:06 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Sat, 28 Sep 2013 05:06:02 +0000 (05:06 +0000)
fuel array might be null!

source/blender/blenkernel/intern/smoke.c

index 2e2fb1e18f826d095a80bb4d8930ebf3cda02750..fb0e22abf2ae17e9e453f1b1ae03e04d986e36a7 100644 (file)
@@ -2409,7 +2409,7 @@ static void update_effectors(Scene *scene, Object *ob, SmokeDomainSettings *sds,
                                        float voxelCenter[3] = {0, 0, 0}, vel[3] = {0, 0, 0}, retvel[3] = {0, 0, 0};
                                        unsigned int index = smoke_get_index(x, sds->res[0], y, sds->res[1], z);
 
-                                       if ((MAX2(density[index], fuel[index]) < FLT_EPSILON) || obstacle[index])
+                                       if (((fuel ? MAX2(density[index], fuel[index]) : density[index]) < FLT_EPSILON) || obstacle[index])
                                                continue;
 
                                        vel[0] = velocity_x[index];