mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[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:
parent
e0fa853f47
commit
d9b231e2aa
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ W_GetLumpName (const char *name)
|
||||||
}
|
}
|
||||||
lump = W_GetLumpinfo (name);
|
lump = W_GetLumpinfo (name);
|
||||||
|
|
||||||
return (void *) (wad_base + lump->filepos);
|
return lump ? (wad_base + lump->filepos) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
VISIBLE void
|
VISIBLE void
|
||||||
|
|
Loading…
Reference in a new issue