Fix R_CacheSpriteBrightMap trying to cache out of range lump
This commit is contained in:
parent
8901725645
commit
cc94145e19
1 changed files with 8 additions and 1 deletions
|
|
@ -1240,7 +1240,14 @@ static patch_t *R_CacheSpriteBrightMap(const spriteinfo_t *sprinfo, UINT8 frame)
|
|||
name = sprinfo->bright[SPRINFO_DEFAULT_PIVOT];
|
||||
}
|
||||
|
||||
return W_CachePatchNum(W_CheckNumForLongName(name), PU_SPRITE);
|
||||
const lumpnum_t num = W_CheckNumForLongName(name);
|
||||
|
||||
if (num == LUMPERROR)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return W_CachePatchNum(num, PU_SPRITE);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in a new issue