From d3822cd7a58dec69805ee46f63cbbc06caf43c46 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Sat, 16 Mar 2024 04:02:01 +0000 Subject: [PATCH] Merge branch 'fix-map-command-ghost-crash' into 'master' Free ghosts when level data is freed Closes #1163 See merge request KartKrew/Kart!2108 --- src/p_setup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p_setup.c b/src/p_setup.c index dd8684ebd..bf2f42f65 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -8893,6 +8893,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate) HWR_ClearAllTextures(); #endif + G_FreeGhosts(); // ghosts are allocated with PU_LEVEL Patch_FreeTag(PU_PATCH_LOWPRIORITY); Patch_FreeTag(PU_PATCH_ROTATED); Z_FreeTags(PU_LEVEL, PU_PURGELEVEL - 1);