From 765a3840f10c0845009a4786adca0286ab84b493 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Sat, 6 Jul 2024 00:58:14 -0300 Subject: [PATCH] Fix a possible crash --- src/r_skins.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/r_skins.c b/src/r_skins.c index 65e7a471d..e857a1a00 100644 --- a/src/r_skins.c +++ b/src/r_skins.c @@ -1086,16 +1086,14 @@ void R_DelSkins(void) for (int i = 0; i < numskins; i++) { ST_UnLoadFaceGraphics(i); - Z_Free(skins[i]); - - skins[i] = NULL; } - numskins = 0; - Z_Free(skins); + skins = NULL; + numskins = 0; + M_InitCharacterTables(0); }