From 94688a3700d72ae2e20be19d701ec50813a5584d Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 30 Oct 2018 01:12:50 -0400 Subject: [PATCH] - do a texture check when drawing fog borders in the software renderer. this does not fix the crash issue, but mitigates it enough with a check that likely should be in place, anyhow. --- src/swrenderer/line/r_renderdrawsegment.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/swrenderer/line/r_renderdrawsegment.cpp b/src/swrenderer/line/r_renderdrawsegment.cpp index f21c9e79f3..fbc18b0c6f 100644 --- a/src/swrenderer/line/r_renderdrawsegment.cpp +++ b/src/swrenderer/line/r_renderdrawsegment.cpp @@ -159,6 +159,9 @@ namespace swrenderer auto viewport = Thread->Viewport.get(); Clip3DFloors *clip3d = Thread->Clip3D.get(); + if (curline->sidedef->GetTexture(side_t::mid).isNull()) + return false; + FTexture *tex = TexMan(curline->sidedef->GetTexture(side_t::mid), true); if (i_compatflags & COMPATF_MASKEDMIDTEX) {