From 53ac275b47ef835272a9910b01d14ecf36eca439 Mon Sep 17 00:00:00 2001 From: Victor Rafael Date: Thu, 25 Apr 2024 13:39:09 -0300 Subject: [PATCH] Fixed double player free on world regen --- src/modes/generate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modes/generate.c b/src/modes/generate.c index c9ff626..30ce054 100644 --- a/src/modes/generate.c +++ b/src/modes/generate.c @@ -10,9 +10,9 @@ Mode *generate_mode(ModeData *data) } data->world = create_world(1024, 1024); init_world(data->world); - if (data->player != NULL) { + /*if (data->player != NULL) { free_creature(data->player); - } + }*/ data->player = create_player(data->world); for (int i = 0; i < 256; i++) {