diff --git a/src/r_things.c b/src/r_things.c index 22bd404ae..d296a30a8 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1232,7 +1232,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); } //