From 607e0482657adb5e86f058c8b2cb71040d5e0b85 Mon Sep 17 00:00:00 2001 From: cignoni Date: Thu, 3 Oct 2013 14:32:01 +0000 Subject: [PATCH] added a few assert in the newly added AddFace shortcut --- vcg/complex/allocate.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vcg/complex/allocate.h b/vcg/complex/allocate.h index f76dc089..41a0f2f6 100644 --- a/vcg/complex/allocate.h +++ b/vcg/complex/allocate.h @@ -454,6 +454,10 @@ namespace tri { */ static FaceIterator AddFace(MeshType &m, VertexPointer v0, VertexPointer v1, VertexPointer v2) { + assert(m.vert.size()>0); + assert(v0>=&m.vert.front() && v0<=&m.vert.back()); + assert(v1>=&m.vert.front() && v1<=&m.vert.back()); + assert(v2>=&m.vert.front() && v2<=&m.vert.back()); PointerUpdater pu; FaceIterator fi = AddFaces(m,1,pu); fi->V(0)=v0;