Skip to content

Commit

Permalink
Fixed: Potential segfault in GL_DrawPatch_CS if param lump is not a v…
Browse files Browse the repository at this point in the history
…alid lump id.
  • Loading branch information
danij committed Aug 23, 2008
1 parent d1779cb commit 738b40d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doomsday/engine/portable/src/gl_draw.c
Expand Up @@ -159,6 +159,9 @@ void GL_DrawPatch_CS(int posX, int posY, lumpnum_t lump)
float w, h;
patchtex_t* p = R_GetPatchTex(lump);

if(!p)
return;

// Set the texture.
GL_BindTexture(GL_PreparePatch(p->lump), glmode[texMagMode]);

Expand Down

0 comments on commit 738b40d

Please sign in to comment.