summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-03-18 19:01:48 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-03-18 19:01:48 (EDT)
commit780e50396c7d4b60e8a3483fa962962ea7481fe4 (patch)
tree08761012576cb5f2be8fead818784b770f18346a
parent29fb8700572cfa1687d84e0a9376e2cd991c3a7a (diff)
downloaddodge-balls-780e50396c7d4b60e8a3483fa962962ea7481fe4.zip
dodge-balls-780e50396c7d4b60e8a3483fa962962ea7481fe4.tar.gz
dodge-balls-780e50396c7d4b60e8a3483fa962962ea7481fe4.tar.bz2
main-menu: Appease GCC...
-rw-r--r--src/main-menu.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main-menu.c b/src/main-menu.c
index f1a3830..4a46380 100644
--- a/src/main-menu.c
+++ b/src/main-menu.c
@@ -127,6 +127,7 @@ db_main_menu(void)
}
/* Find games */
+ games = NULL;
n = db_games_find(games_dir, &games);
buttons = calloc(n + 2, sizeof(*buttons));
if (buttons == NULL) {
@@ -251,12 +252,6 @@ db_main_menu(void)
SDL_Delay(1000);
err:
- if (n > 0) {
- for (i = 0; i < n; ++i) {
- db_game_free(games[i]);
- }
- free(games);
- }
free(font_path);
TTF_CloseFont(font);
}