diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c
index 8c36eeded5ab3468834ffe1f515917d6d65e61b9..2f986085a0a38765fd7192f18c91d3cde96bccc3 100644
--- a/src/hardware/hw_main.c
+++ b/src/hardware/hw_main.c
@@ -3774,11 +3774,13 @@ static void HWR_Subsector(size_t num)
 
 			if (!line->glseg
 #ifdef POLYOBJECTS
-				&& !line->polyseg // ignore segs that belong to polyobjects
+			    && !line->polyseg // ignore segs that belong to polyobjects
 #endif
-				)
+			)
+			{
 				HWR_AddLine(line);
-				line++;
+			}
+			line++;
 		}
 	}