summaryrefslogtreecommitdiff
path: root/src/renderer/tr_shader.c
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2012-05-07 23:06:00 +0000
committerTim Angus <tim@ngus.net>2013-01-12 20:28:44 +0000
commit5a9452339a52b22f158846e97b932640627409f1 (patch)
treea9f2662f2a38cb40f6fb2e2f8072ed01f1a5c6ff /src/renderer/tr_shader.c
parent0079706cedac577b82ad51b7d633dbbe6a143615 (diff)
#5503 - SIGSEGV with r_vertexlight 1 in missionpack (patch by Serge Belyshev).
Diffstat (limited to 'src/renderer/tr_shader.c')
-rw-r--r--src/renderer/tr_shader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/renderer/tr_shader.c b/src/renderer/tr_shader.c
index 2bbc3a12..6bbaa8ca 100644
--- a/src/renderer/tr_shader.c
+++ b/src/renderer/tr_shader.c
@@ -628,7 +628,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
else if ( !Q_stricmp( token, "$lightmap" ) )
{
stage->bundle[0].isLightmap = qtrue;
- if ( shader.lightmapIndex < 0 ) {
+ if ( shader.lightmapIndex < 0 || !tr.lightmaps ) {
stage->bundle[0].image[0] = tr.whiteImage;
} else {
stage->bundle[0].image[0] = tr.lightmaps[shader.lightmapIndex];