git » fp-git.git » commit 4c69577

mem bugfix

author ecalot
2004-08-25 03:27:22 UTC
committer ecalot
2004-08-25 03:27:22 UTC
parent 72bf438ddb37a4eb9dac249cd6a9411f95445027

mem bugfix

FP/src/res/resources.c +1 -1

diff --git a/FP/src/res/resources.c b/FP/src/res/resources.c
index 857be73..74f2ed6 100644
--- a/FP/src/res/resources.c
+++ b/FP/src/res/resources.c
@@ -154,11 +154,11 @@ tData* resLoad(long id) {
 				printf("Fatal Error: resLoad: level not found!\n");
 				return NULL;
 			}
-			mReadCloseDatFile();
 			result=(tData*)malloc(sizeof(tData));
 			result->frames=1; /* drop filename and palette */
 			result->type=eLevels;
 			result->pFrames=(void**)mapLoadLevel(raw);
+			mReadCloseDatFile();
 			return result; /* transform from raw to a loaded map */
 		case RES_TYPE_IMG: {
 			tMemory palette;