From de79e1433d8dee3d4ac685b0e10cd9c42dbe0783 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 24 Dec 2000 04:43:22 +0000 Subject: [PATCH] don't resample a texture when the output size is 0xN or Nx0 --- source/gl_draw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/gl_draw.c b/source/gl_draw.c index 978ea7b..9aec3f6 100644 --- a/source/gl_draw.c +++ b/source/gl_draw.c @@ -1036,6 +1036,8 @@ GL_ResampleTexture (unsigned int *in, int inwidth, int inheight, unsigned int *inrow; unsigned int frac, fracstep; + if (!outwidth || !outheight) + return; fracstep = inwidth * 0x10000 / outwidth; for (i = 0; i < outheight; i++, out += outwidth) { inrow = in + inwidth * (i * inheight / outheight);