From 8e0c50c22c5370938bdcd65c2aa5573e2943c150 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 2 Feb 2021 23:13:11 +0100 Subject: [PATCH] - fixed: F2DDrawer::AddPoly was missing a texture validation check. This caused problems when the automap wanted to render portal planes, which normally use an invalid texture as marker. Fixes #263 --- source/common/2d/v_2ddrawer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/common/2d/v_2ddrawer.cpp b/source/common/2d/v_2ddrawer.cpp index 157101160..0837e7da6 100644 --- a/source/common/2d/v_2ddrawer.cpp +++ b/source/common/2d/v_2ddrawer.cpp @@ -721,6 +721,8 @@ void F2DDrawer::AddPoly(FGameTexture* img, FVector4* vt, size_t vtcount, unsigne RenderCommand dg; int method = 0; + if (!img->isValid()) return; + dg.mType = DrawTypeTriangles; if (clipx1 > 0 || clipy1 > 0 || clipx2 < GetWidth() - 1 || clipy2 < GetHeight() - 1) {