From 36f168040edc49bdfe9ee8cd7fcda8db5c32b967 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sun, 4 Dec 2016 03:12:40 +0100 Subject: [PATCH] Fix null pointer crash bug --- src/r_poly_wall.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_poly_wall.cpp b/src/r_poly_wall.cpp index 4dd24887d..384529da0 100644 --- a/src/r_poly_wall.cpp +++ b/src/r_poly_wall.cpp @@ -38,7 +38,7 @@ EXTERN_CVAR(Bool, r_drawmirrors) bool RenderPolyWall::RenderLine(const TriMatrix &worldToClip, const Vec4f &clipPlane, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, std::vector &translucentWallsOutput, std::vector> &linePortals) { PolyDrawLinePortal *polyportal = nullptr; - if (line->backsector == nullptr && line->sidedef == line->linedef->sidedef[0] && (line->linedef->special == Line_Mirror && r_drawmirrors)) + if (line->backsector == nullptr && line->linedef && line->sidedef == line->linedef->sidedef[0] && (line->linedef->special == Line_Mirror && r_drawmirrors)) { linePortals.push_back(std::make_unique(line->linedef)); polyportal = linePortals.back().get();