From e9ba519fa40ae9deb9b875b8e771c0f38e53a0fd Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Sun, 14 Sep 2014 01:02:42 +0000 Subject: [PATCH] small change to do not insert and cycle to find polygons of size 0 --- vcg/complex/algorithms/polygon_support.h | 1 + 1 file changed, 1 insertion(+) diff --git a/vcg/complex/algorithms/polygon_support.h b/vcg/complex/algorithms/polygon_support.h index 5472809e..0ae52ffc 100644 --- a/vcg/complex/algorithms/polygon_support.h +++ b/vcg/complex/algorithms/polygon_support.h @@ -143,6 +143,7 @@ namespace tri { ExtractPolygon(&*tfi,vs); std::reverse(vs.begin(),vs.end()); //now vs contains all the vertices of the polygon (still in the trimesh) + if (vs.size()==0)continue; typename PolyMeshType::FaceIterator pfi = tri::Allocator::AddFaces(pm,1); (*pfi).Alloc(vs.size()); for(size_t i = 0 ; i < vs.size(); ++i)