diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 4e3096d0325..a44b5e7691b 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1772,7 +1772,6 @@ static void give_parvert(Object *par, int nr, float vec[3]) if (par->type == OB_MESH) { Mesh *me = par->data; DerivedMesh *dm; - int count; em = me->edit_btmesh; @@ -1795,6 +1794,7 @@ static void give_parvert(Object *par, int nr, float vec[3]) dm = (em) ? em->derivedFinal : par->derivedFinal; if (dm) { + int count = 0; int numVerts = dm->getNumVerts(dm); if (nr < numVerts) { @@ -1803,7 +1803,6 @@ static void give_parvert(Object *par, int nr, float vec[3]) int i; /* get the average of all verts with (original index == nr) */ - count = 0; if (index) { for (i = 0; i < numVerts; i++) { if (index[i] == nr) { diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 26952db8fba..ef03db7ed8f 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -4539,8 +4539,8 @@ void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3] /* can happen with bad pointcache or physics calculation * since this becomes geometry, nan's and inf's crash raytrace code. * better not allow this. */ - if (!finite(bb->vec[0]) || !finite(bb->vec[1]) || !finite(bb->vec[2]) || - !finite(bb->vel[0]) || !finite(bb->vel[1]) || !finite(bb->vel[2]) ) + if ((!finite(bb->vec[0])) || (!finite(bb->vec[1])) || (!finite(bb->vec[2])) || + (!finite(bb->vel[0])) || (!finite(bb->vel[1])) || (!finite(bb->vel[2])) ) { zero_v3(bb->vec); zero_v3(bb->vel); |