From b686137d12d8adb5920210b9cf9085738267a51b Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 22 Oct 2022 19:56:13 +0100 Subject: [PATCH] Correctly NULL thumbnailPic and minimapPic when map lumpnum changes Fixes the core part of Chengi's graphical issue --- src/p_setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/p_setup.c b/src/p_setup.c index 0901d2156..518683816 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -4506,11 +4506,13 @@ UINT8 P_InitMapData(INT32 numexistingmapheaders) if (mapheaderinfo[i]->thumbnailPic) { Patch_Free(mapheaderinfo[i]->thumbnailPic); + mapheaderinfo[i]->thumbnailPic = NULL; } if (mapheaderinfo[i]->minimapPic) { Patch_Free(mapheaderinfo[i]->minimapPic); + mapheaderinfo[i]->minimapPic = NULL; } // Now apply the new ones!