From 196bb0349ccbd8ef1a50a587dbe64708209ecbbe Mon Sep 17 00:00:00 2001 From: danij Date: Mon, 11 Mar 2013 02:39:09 +0000 Subject: [PATCH] Vertex: Fixed oversight in the previous cleanup refactoring --- doomsday/client/src/map/vertex.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/doomsday/client/src/map/vertex.cpp b/doomsday/client/src/map/vertex.cpp index 61230c51fe..d71ddcce47 100644 --- a/doomsday/client/src/map/vertex.cpp +++ b/doomsday/client/src/map/vertex.cpp @@ -57,19 +57,21 @@ void Vertex::countLineOwners(uint *oneSided, uint *twoSided) const uint ones = 0, twos = 0; - LineOwner const *firstOwn = firstLineOwner(); - LineOwner const *own = firstOwn; - do + if(LineOwner const *firstOwn = firstLineOwner()) { - if(!own->lineDef().L_frontsidedef || !own->lineDef().L_backsidedef) + LineOwner const *own = firstOwn; + do { - ++ones; - } - else - { - ++twos; - } - } while((own = &own->next()) != firstOwn); + if(!own->lineDef().L_frontsidedef || !own->lineDef().L_backsidedef) + { + ++ones; + } + else + { + ++twos; + } + } while((own = &own->next()) != firstOwn); + } if(oneSided) *oneSided += ones; if(twoSided) *twoSided += twos;