From 8e636b8abf4af42cde98aa2bf607f947b2f59ca5 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 14 Dec 2011 00:36:47 +0000 Subject: [PATCH] - Fixed: Must not try to draw null flats in the textured automap. SVN r3333 (trunk) --- src/am_map.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/am_map.cpp b/src/am_map.cpp index d2046f33e..11ecf74af 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -1728,15 +1728,19 @@ void AM_drawSubsectors() } // Draw the polygon. - screen->FillSimplePoly(TexMan(maptex), - &points[0], points.Size(), - originx, originy, - scale / (FIXED2FLOAT(sec->GetXScale(sector_t::floor)) * float(1 << MAPBITS)), - scale / (FIXED2FLOAT(sec->GetYScale(sector_t::floor)) * float(1 << MAPBITS)), - rotation, - colormap, - floorlight - ); + FTexture *pic = TexMan(maptex); + if (pic != NULL && pic->UseType != FTexture::TEX_Null) + { + screen->FillSimplePoly(TexMan(maptex), + &points[0], points.Size(), + originx, originy, + scale / (FIXED2FLOAT(sec->GetXScale(sector_t::floor)) * float(1 << MAPBITS)), + scale / (FIXED2FLOAT(sec->GetYScale(sector_t::floor)) * float(1 << MAPBITS)), + rotation, + colormap, + floorlight + ); + } } }