Skip to content

Commit

Permalink
- Fixed crash with dummy texture inside FTexture::FillBuffer in softw…
Browse files Browse the repository at this point in the history
…are mode.

 Caused by The following GameInfo line in Doom Tournament:
 Border = 0,0,"","","","","","","",""
  • Loading branch information
drfrag666 committed May 15, 2019
1 parent 5fb354e commit 1186bcc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/textures/texture.cpp
Expand Up @@ -759,6 +759,8 @@ void FTexture::FillBuffer(uint8_t *buff, int pitch, int height, FTextureFormat f
case TEX_Pal:
case TEX_Gray:
pix = GetPixels(fmt == TEX_Pal? DefaultRenderStyle() : LegacyRenderStyles[STYLE_Shaded]);
if (pix == nullptr) // Dummy texture?
return;
stride = pitch - w;
for (y = 0; y < h; ++y)
{
Expand Down

0 comments on commit 1186bcc

Please sign in to comment.