Skip to content

Commit ed4b785

Browse files
committed
Fix potential divide by zero for extremely narrow images
1 parent 81fbf3c commit ed4b785

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

v002RuttEtraPlugIn.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ - (void) createGLResourcesInContext:(CGLContextObj)cgl_ctx width:(NSUInteger)w h
849849
GLuint i = 0, x, y;
850850
for( y = 0; y < h - 1 ; y++)
851851
{
852-
for(x = 0; x < w - 1 ; x++)
852+
for(x = 0; x < w - 1 && w > 2; x++)
853853
{
854854
// this little aparatus makes sure we do not draw a line segment between different rows of scanline.
855855
if (i % (w - 2) <= (w - 1))

0 commit comments

Comments
 (0)