From 4bd8ea7c07e2f3a8c595aed5d166bb823720c2b8 Mon Sep 17 00:00:00 2001 From: Dusan Durech Date: Sun, 9 Nov 2008 16:26:16 +0100 Subject: fix memory leak with image in openGL code --- src/client/font.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/client/font.c') diff --git a/src/client/font.c b/src/client/font.c index 45ef5e4..8d522b2 100644 --- a/src/client/font.c +++ b/src/client/font.c @@ -61,10 +61,6 @@ void drawFont(char *string, int x, int y, int r, int g, int b) image = newImage(text); drawImage(image, x, y, 0, 0, image->w, image->h); destroyImage(image); - -#ifdef SUPPORT_OPENGL - SDL_FreeSurface(text); // we don't need text anymore -#endif }; } @@ -107,10 +103,6 @@ void drawFontMaxSize(char *s, int x, int y, int w, int h, int r, int g, int b) //posibly broken drawImage(i, x, y, 0, 0, my_w, my_h); destroyImage(i); - -#ifdef SUPPORT_OPENGL - SDL_FreeSurface(text); // we don't need text anymore -#endif } /* -- cgit v1.2.3