Skip to content

Commit

Permalink
Fix segfault on gameover
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan0083 committed Jul 17, 2020
1 parent b9f1634 commit d3c729c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snake/game.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ static void run(Game *game, SDL_Renderer *ren) {
*/
static void run_gameover(Game *game) {
game->status = GAME_OVER;
free(game->snake);
free(game->food);
/* free(game->snake); */
/* free(game->food); */
game->initialized = false;
}

Expand Down

0 comments on commit d3c729c

Please sign in to comment.