[util] Return null for missing wad lumps

Segfaults are not good when a lump can't be found as it makes error
checking difficult.
This commit is contained in:
Bill Currie 2022-11-10 14:44:08 +09:00
parent e0fa853f47
commit d9b231e2aa
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ W_GetLumpName (const char *name)
}
lump = W_GetLumpinfo (name);
return (void *) (wad_base + lump->filepos);
return lump ? (wad_base + lump->filepos) : 0;
}
VISIBLE void