From f175af7a471ddcbcce75e02079bf41e624517897 Mon Sep 17 00:00:00 2001 From: NepDisk Date: Sat, 23 Aug 2025 18:41:37 -0400 Subject: [PATCH] Fix UDMF crash --- src/hardware/hw_main.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 1f2131732..1dab35638 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2866,24 +2866,11 @@ static void HWR_Subsector(size_t num) // without talking about the overdraw of course. sub->sector->validcount = validcount;/// \todo fix that in a better way - if (UNLIKELY(numPolyObjects)) + while (count--) { - - while (count--) - { - - if (LIKELY(!line->polyseg)) // ignore segs that belong to polyobjects - HWR_AddLine(line); - line++; - } - } - else - { - while (count--) - { + if (LIKELY(!line->glseg && !line->polyseg)) // ignore segs that belong to polyobjects HWR_AddLine(line); - line++; - } + line++; } }