Skip to content

Commit

Permalink
Fix seg fault when missing TXT_RENDER_GLOWTEXTURES/TXT_RENDER_GLOWFLA…
Browse files Browse the repository at this point in the history
…TS text strings.
  • Loading branch information
danij committed Aug 28, 2006
1 parent 6ad47d2 commit 20c1b4f
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions doomsday/plugins/common/src/g_update.c
Expand Up @@ -198,25 +198,31 @@ void G_SetGlowing(void)

if(!ArgCheck("-noglow"))
{
ptr = GET_TXT(TXT_RENDER_GLOWFLATS);
// Set some glowing textures.
for(ptr = ScanWord(ptr, buf); *buf; ptr = ScanWord(ptr, buf))
ptr = GET_TXT(TXT_RENDER_GLOWFLATS);
if(ptr)
{
// Is there such a flat?
if(W_CheckNumForName(buf) == -1)
continue;
Set(DD_TEXTURE_GLOW,
DD_TGLOW_PARM(R_FlatNumForName(buf), false, true));
for(ptr = ScanWord(ptr, buf); *buf; ptr = ScanWord(ptr, buf))
{
// Is there such a flat?
if(W_CheckNumForName(buf) == -1)
continue;
Set(DD_TEXTURE_GLOW,
DD_TGLOW_PARM(R_FlatNumForName(buf), false, true));
}
}

ptr = GET_TXT(TXT_RENDER_GLOWTEXTURES);
for(ptr = ScanWord(ptr, buf); *buf; ptr = ScanWord(ptr, buf))
if(ptr)
{
// Is there such a texture?
if(R_CheckTextureNumForName(buf) == -1)
continue;
Set(DD_TEXTURE_GLOW,
DD_TGLOW_PARM(R_TextureNumForName(buf), true, true));
for(ptr = ScanWord(ptr, buf); *buf; ptr = ScanWord(ptr, buf))
{
// Is there such a texture?
if(R_CheckTextureNumForName(buf) == -1)
continue;
Set(DD_TEXTURE_GLOW,
DD_TGLOW_PARM(R_TextureNumForName(buf), true, true));
}
}
}
}

0 comments on commit 20c1b4f

Please sign in to comment.