mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 05:01:40 +00:00
Fix potential segfault when no PK3s have been loaded (may happen when compiled with -DSTANDALONE)
This commit is contained in:
parent
7471510c8e
commit
fdb66505bf
1 changed files with 3 additions and 0 deletions
|
@ -2327,6 +2327,9 @@ static char *FindShaderInShaderText( const char *shadername ) {
|
||||||
|
|
||||||
hash = generateHashValue(shadername, MAX_SHADERTEXT_HASH);
|
hash = generateHashValue(shadername, MAX_SHADERTEXT_HASH);
|
||||||
|
|
||||||
|
if(!shaderTextHashTable[hash])
|
||||||
|
return NULL;
|
||||||
|
|
||||||
for (i = 0; shaderTextHashTable[hash][i]; i++) {
|
for (i = 0; shaderTextHashTable[hash][i]; i++) {
|
||||||
p = shaderTextHashTable[hash][i];
|
p = shaderTextHashTable[hash][i];
|
||||||
token = COM_ParseExt(&p, qtrue);
|
token = COM_ParseExt(&p, qtrue);
|
||||||
|
|
Loading…
Reference in a new issue