Prevent a mod by 0, should fix preview render crashes
authorJohnny Matthews <johnny.matthews@gmail.com>
Tue, 24 Jan 2006 17:17:44 +0000 (17:17 +0000)
committerJohnny Matthews <johnny.matthews@gmail.com>
Tue, 24 Jan 2006 17:17:44 +0000 (17:17 +0000)
source/blender/render/intern/source/initrender.c

index c37b30a9bcb29a060b62ffb312f9221324c0effe..a6abe396d4892d48082f82a5c1f9950d905ffd89 100644 (file)
@@ -502,7 +502,7 @@ void RE_SetCamera(Render *re, Object *camera)
        }
 
        xd= yd= 0.0;
-       if(blursample!= -1) {
+       if(blursample != -1 && re->osa != 0 ) {
                re->bluroffsx= xd= re->jit[blursample % re->osa][0];
                re->bluroffsy= yd= re->ycor*re->jit[blursample % re->osa][1];
        }