From 6b4d22565ef3059e4fd6e1b88408b6a18bf59ad6 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Tue, 29 Oct 2024 09:29:53 +0100 Subject: [PATCH] return early out of R_StoreWallRange() if a line has no linedef Only possible with XGLN/ZGLN nodes. Silence a buch of clang-tidy warnings. --- src/r_segs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/r_segs.c b/src/r_segs.c index 9f2e809a..42a2481f 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -539,9 +539,11 @@ void R_StoreWallRange(const int start, const int stop) sidedef = curline->sidedef; linedef = curline->linedef; + if (!linedef) + return; + // mark the segment as visible for auto map - if (linedef) - linedef->flags |= ML_MAPPED; + linedef->flags |= ML_MAPPED; // [FG] update automap while playing if (automap_on)