[quake3-commits] r1810 - trunk/code/renderer
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Jan 21 20:13:31 EST 2011
Author: thilo
Date: 2011-01-21 20:13:30 -0500 (Fri, 21 Jan 2011)
New Revision: 1810
Modified:
trunk/code/renderer/tr_shader.c
Log:
Fix this bug in a better way.
Modified: trunk/code/renderer/tr_shader.c
===================================================================
--- trunk/code/renderer/tr_shader.c 2011-01-22 01:10:34 UTC (rev 1809)
+++ trunk/code/renderer/tr_shader.c 2011-01-22 01:13:30 UTC (rev 1810)
@@ -2327,14 +2327,15 @@
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);
- if ( !Q_stricmp( token, shadername ) ) {
- return p;
+ if(shaderTextHashTable[hash])
+ {
+ for (i = 0; shaderTextHashTable[hash][i]; i++)
+ {
+ p = shaderTextHashTable[hash][i];
+ token = COM_ParseExt(&p, qtrue);
+
+ if(!Q_stricmp(token, shadername))
+ return p;
}
}
More information about the quake3-commits
mailing list