git » fp-git.git » commit 01c4e77

Libero memoria de las imagenes

author gazer
2004-07-23 19:38:51 UTC
committer gazer
2004-07-23 19:38:51 UTC
parent f299ae4fc9393e5e39f18742354649af5f994be7

Libero memoria de las imagenes

FP/src/out/output.c +3 -2

diff --git a/FP/src/out/output.c b/FP/src/out/output.c
index 13adffb..cd52121 100644
--- a/FP/src/out/output.c
+++ b/FP/src/out/output.c
@@ -76,7 +76,6 @@ void putpixel(SDL_Surface *surface, int x, int y, Uint32 pixel)
 	*p = pixel;
 }
 
-
 /* Graphics: Primitives for resources module */
 void*
 outputLoadBitmap(const unsigned char* data, int size, 
@@ -149,7 +148,9 @@ outputLoadBitmap(const unsigned char* data, int size,
 
 /* Frees the abstract object created by the loadBitmap function */
 void outputFreeBitmap(void* image) {
-	free(image); /* TODO: I think some SDL stuff should be here */
+	if (image) {
+		SDL_FreeSurface((SDL_Surface *)image);
+	}
 }
 
 /* Graphics: Primitives for the kernel */