Polymost: crash prevention for bad pal sprites (and warning in Mapster 3D mode)

git-svn-id: https://svn.eduke32.com/eduke32@1920 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-06-26 13:00:31 +00:00
parent 0bc508eecd
commit 3bc56d267c

View file

@ -2033,6 +2033,16 @@ void drawpoly(double *dpx, double *dpy, int32_t n, int32_t method)
if (skyclamphack) method |= 4;
pth = gltexcache(globalpicnum,globalpal,method&(~3));
if (!pth)
{
if (editstatus)
{
Bsprintf(ptempbuf, "pth==NULL! (bad pal?) pic=%d pal=%d", globalpicnum, globalpal);
polymost_printext256(8,8, editorcolors[15],editorcolors[5], ptempbuf, 0);
}
return;
}
if (r_fullbrights && pth->flags & 16)
if (indrawroomsandmasks)
{