- Fixed crash with dummy texture inside FTexture::FillBuffer in software mode.

Caused by The following GameInfo line in Doom Tournament:
 Border = 0,0,"","","","","","","",""
This commit is contained in:
drfrag 2019-05-15 18:41:11 +02:00
parent 5fb354e7f4
commit 1186bccca0

View file

@ -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)
{