diff options
Diffstat (limited to 'level.c')
-rw-r--r-- | level.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); |