summaryrefslogtreecommitdiffstats
path: root/level.c
diff options
context:
space:
mode:
Diffstat (limited to 'level.c')
-rw-r--r--level.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/level.c b/level.c
index 4253746..7c6aaa9 100644
--- a/level.c
+++ b/level.c
@@ -36,8 +36,11 @@ void freeLevel(LEVEL *lvl) {
if(lvl) {
if(lvl->rooms) {
for(i = 0; i < lvl->nRooms; i++) {
- if(lvl->rooms[i].vertices)
- free(lvl->rooms[i].vertices);
+ if(lvl->rooms[i].polygon.vertices)
+ free(lvl->rooms[i].polygon.vertices);
+
+ if(lvl->rooms[i].name)
+ free(lvl->rooms[i].name);
}
free(lvl->rooms);