Fixed crash when spawning decal without texture

See http://forum.zdoom.org/viewtopic.php?t=50977
This commit is contained in:
alexey.lysiuk 2016-02-24 11:26:42 +02:00 committed by Christoph Oelckers
parent 51da78ba29
commit 8ba6f6ced5

View file

@ -528,7 +528,11 @@ void DBaseDecal::Spread (const FDecalTemplate *tpl, side_t *wall, fixed_t x, fix
GetWallStuff (wall, v1, ldx, ldy);
rorg = Length (x - v1->x, y - v1->y);
tex = TexMan[PicNum];
if ((tex = TexMan[PicNum]) == NULL)
{
return;
}
int dwidth = tex->GetWidth ();
DecalWidth = dwidth * ScaleX;