From 725dde5532d7c8a55bd3e90422ba1f3eb54d9080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20M=C3=B6ller?= Date: Wed, 15 Oct 2014 09:20:04 +0000 Subject: [PATCH] fix comparison with invalid iterator refs #2263 git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1177 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Tools/VDPM/VFront.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/OpenMesh/Tools/VDPM/VFront.cc b/src/OpenMesh/Tools/VDPM/VFront.cc index 43c65b8d..8ce03622 100644 --- a/src/OpenMesh/Tools/VDPM/VFront.cc +++ b/src/OpenMesh/Tools/VDPM/VFront.cc @@ -76,10 +76,11 @@ VFront:: remove(VHierarchyNodeHandle _node_handle) { VHierarchyNodeHandleListIter node_it = front_location_[_node_handle.idx()]; + const bool isFront = (front_it_ == node_it); VHierarchyNodeHandleListIter next_it = front_.erase(node_it); front_location_[_node_handle.idx()] = front_.end(); - if (front_it_ == node_it) + if (isFront) front_it_ = next_it; }