Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix crash on Chex intermission #1368

Merged
merged 1 commit into from Jan 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/wi_stuff.c
Expand Up @@ -318,10 +318,10 @@ static int NUMCMAPS;
//

// You Are Here graphic
static patch_t* yah[2];
static patch_t* yah[3] = {NULL, NULL, NULL};

// splat
static patch_t* splat;
static patch_t* splat[2] = {NULL, NULL};

// %, : graphics
static patch_t* percent;
Expand Down Expand Up @@ -565,7 +565,7 @@ WI_drawOnLnode // draw stuff at a location by episode/map#
else
i++;
}
while (!fits && i!=2);
while (!fits && i!=2 && c[i]);

if (fits && i<2)
{
Expand Down Expand Up @@ -883,7 +883,7 @@ static void WI_unloadData(void)
Z_ChangeTag(yah[0], PU_CACHE);
Z_ChangeTag(yah[1], PU_CACHE);

Z_ChangeTag(splat, PU_CACHE);
Z_ChangeTag(splat[0], PU_CACHE);

for (i=0 ; i<NUMMAPS ; i++)
if (lnames[i])
Expand Down Expand Up @@ -1068,11 +1068,11 @@ static void WI_drawShowNextLoc(void)

// draw a splat on taken cities.
for (i=0 ; i<=last ; i++)
WI_drawOnLnode(i, &splat);
WI_drawOnLnode(i, splat);

// splat the secret level?
if (wbs->didsecret)
WI_drawOnLnode(8, &splat);
WI_drawOnLnode(8, splat);

// draw flashing ptr
if (snl_pointeron)
Expand Down Expand Up @@ -1999,7 +1999,7 @@ void WI_loadData(void)
yah[1] = W_CacheLumpName("WIURH1", PU_STATIC);

// splat
splat = W_CacheLumpName("WISPLAT", PU_STATIC);
splat[0] = W_CacheLumpName("WISPLAT", PU_STATIC);

if (wbs->epsd < 3)
{
Expand Down