diff --git a/source/src/rendergl.cpp b/source/src/rendergl.cpp index 7e222ec7..c717f3c9 100644 --- a/source/src/rendergl.cpp +++ b/source/src/rendergl.cpp @@ -107,7 +107,7 @@ GLuint installtex(const char *texname, int &xs, int &ys, bool clamp) }; }; if(gluBuild2DMipmaps(GL_TEXTURE_2D, mode, xs, ys, mode, GL_UNSIGNED_BYTE, scaledimg)) fatal("could not build mipmaps"); - if(xs!=s->w) delete[] scaledimg; + if(scaledimg != (uchar *)s->pixels) delete[] scaledimg; SDL_FreeSurface(s); return tnum; };