From 9f550941d27cf4c848fc1fed8069015f4bed5371 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 19 Jan 2017 01:39:05 +0100 Subject: [PATCH] - fixed loop ordering in P_SetRenderSector. --- src/p_glnodes.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/p_glnodes.cpp b/src/p_glnodes.cpp index bfe3412651..43ed096e0c 100644 --- a/src/p_glnodes.cpp +++ b/src/p_glnodes.cpp @@ -1456,13 +1456,12 @@ void P_SetRenderSector() segs[i].PartnerSeg = segs[i].PartnerSeg->PartnerSeg = nullptr; } } - - for (i = 0; i < numsegs; i++) + } + for (i = 0; i < numsegs; i++) + { + if (segs[i].PartnerSeg != nullptr && segs[i].PartnerSeg->PartnerSeg != &segs[i]) { - if (segs[i].PartnerSeg != nullptr && segs[i].PartnerSeg->PartnerSeg != &segs[i]) - { - segs[i].PartnerSeg = nullptr; - } + segs[i].PartnerSeg = nullptr; } }