Fix potential segfault when no PK3s have been loaded (may happen when compiled with -DSTANDALONE)

This commit is contained in:
Thilo Schulz 2011-01-22 01:10:34 +00:00
parent 7471510c8e
commit fdb66505bf

View file

@ -2327,6 +2327,9 @@ static char *FindShaderInShaderText( const char *shadername ) {
hash = generateHashValue(shadername, MAX_SHADERTEXT_HASH);
if(!shaderTextHashTable[hash])
return NULL;
for (i = 0; shaderTextHashTable[hash][i]; i++) {
p = shaderTextHashTable[hash][i];
token = COM_ParseExt(&p, qtrue);