git » fp-git.git » commit 51f2282

Fixed free function

author ecalot
2004-08-18 08:29:48 UTC
committer ecalot
2004-08-18 08:29:48 UTC
parent 0b7774cba1093451673b4bee1dc472fd907253b3

Fixed free function

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

diff --git a/FP/src/out/output.c b/FP/src/out/output.c
index e9acf7f..1efa500 100644
--- a/FP/src/out/output.c
+++ b/FP/src/out/output.c
@@ -159,7 +159,8 @@ outputLoadBitmap(const unsigned char* data, int size,
 /* Frees the abstract object created by the loadBitmap function */
 void outputFreeBitmap(void* image) {
 	if (image) {
-		SDL_FreeSurface((SDL_Surface *)image);
+		SDL_FreeSurface(((tSurface*)image)->surface);
+		free(image);
 	}
 }