Skip to content

Commit

Permalink
Add safety guard
Browse files Browse the repository at this point in the history
  • Loading branch information
viciious committed Oct 5, 2024
1 parent 5e4ab4b commit 16f3385
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions r_phase3.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ static void R_PrepPSprite(pspdef_t *psp)
state = &states[psp->state];
sprdef = &sprites[state->sprite];
sprframe = &spriteframes[sprdef->firstframe + (state->frame & FF_FRAMEMASK)];
if (sprframe->lump < 0)
return;
sprlump = &spritelumps[sprframe->lump];
lump = sprlump[0];
patch = W_POINTLUMPNUM(lump);
Expand Down

0 comments on commit 16f3385

Please sign in to comment.