home · contact · privacy
Moved allocation and freeing of Win structs into windows library.
[plomrogue] / src / rexit.c
index 7bd4440ab7d429607788a657c76f13e81916bcfc..85e2bfc328798fdb3085bfa9676118084073176a 100644 (file)
@@ -10,7 +10,7 @@
 #include "map.h" /* for Map struct */
 #include "keybindings.h" /* for KeysWinData, KeyBinding structs */
 #include "command_db.h" /* for free_command_db() */
-#include "windows.h" /* for Win struct */
+#include "windows.h" /* for Win struct, free_win() */
 
 
 
@@ -50,19 +50,19 @@ static void cleanup(struct World * world)
     }
     if (cleanup_flags & CLEANUP_WIN_INFO)
     {
-        free(world->wins.info->_title);
+        free_win(world->wins.info);
     }
     if (cleanup_flags & CLEANUP_WIN_MAP)
     {
-        free(world->wins.map->_title);
+        free_win(world->wins.map);
     }
     if (cleanup_flags & CLEANUP_WIN_LOG)
     {
-        free(world->wins.log->_title);
+        free_win(world->wins.log);
     }
     if (cleanup_flags & CLEANUP_WIN_KEYS)
     {
-        free(world->wins.keys->_title);
+        free_win(world->wins.keys);
     }
 }