Skip to content

Commit

Permalink
Fixed: SIGSEGV when attempting to draw surface reflections if the tex…
Browse files Browse the repository at this point in the history
…tures for which had not been located.
  • Loading branch information
danij committed Jun 12, 2009
1 parent 062300a commit f75854e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doomsday/engine/portable/src/rend_main.c
Expand Up @@ -1777,7 +1777,7 @@ static boolean renderWorldPoly(rvertex_t* rvertices, uint numVertices,

rtexcoords5, rcolors, 3 + divs[0].num,
numLights, modTex, modColor, rTU);
if(p->reflective)
if(p->reflective && rTUs[TU_PRIMARY].tex)
{
RL_AddPoly(PT_FAN, RPT_SHINY, rvertices + 3 + divs[0].num,
shinyTexCoords? shinyTexCoords + 3 + divs[0].num : NULL,
Expand All @@ -1796,7 +1796,7 @@ static boolean renderWorldPoly(rvertex_t* rvertices, uint numVertices,
rtexcoords, rtexcoords2, rtexcoords5, rcolors,

numVertices, numLights, modTex, modColor, rTU);
if(p->reflective)
if(p->reflective && rTUs[TU_PRIMARY].tex)
RL_AddPoly(p->isWall? PT_TRIANGLE_STRIP : PT_FAN, RPT_SHINY,
rvertices, shinyTexCoords,
rTUs[TU_INTER].tex? rtexcoords : NULL,
Expand Down

0 comments on commit f75854e

Please sign in to comment.