Fixed bug #7960, Sculpt Mode: Crash after Scaling brush to 1 ("Tile" mode)

Division by zero fix
This commit is contained in:
Nicholas Bishop
2007-12-18 23:27:26 +00:00
parent 5518aaaace
commit 592ed2c812

View File

@@ -857,8 +857,10 @@ float tex_strength(EditData *e, float *point, const float len,const unsigned vin
px= len * cos(angle) + 2000;
py= len * sin(angle) + 2000;
}
px %= sx-1;
py %= sy-1;
if(sx != 1)
px %= sx-1;
if(sy != 1)
py %= sy-1;
p= get_texcache_pixel(ss, tcw*px/sx, tch*py/sy);
} else {
float fx= (pv.co[0] - e->mouse[0] + half) * (tcw*1.0f/bsize) - tcw/2;