summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/font.c8
-rw-r--r--src/client/image.c2
2 files changed, 2 insertions, 8 deletions
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
}
/*
diff --git a/src/client/image.c b/src/client/image.c
index c863849..38296e7 100644
--- a/src/client/image.c
+++ b/src/client/image.c
@@ -147,6 +147,8 @@ image_t* newImage(SDL_Surface *surface)
new->tex_id = tid;
+ SDL_FreeSurface(surface);
+
return new;
}
#endif