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
1 changed files with 5 additions and 1 deletions

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;