From 57bd611892c623de8cf6033f11e95bc43b601299 Mon Sep 17 00:00:00 2001 From: cignoni Date: Wed, 14 Mar 2012 16:02:30 +0000 Subject: [PATCH] added assert in the VFIterator to handle uninitialized topology. --- vcg/simplex/face/pos.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcg/simplex/face/pos.h b/vcg/simplex/face/pos.h index 602bbf0c..60f00aa5 100644 --- a/vcg/simplex/face/pos.h +++ b/vcg/simplex/face/pos.h @@ -430,10 +430,10 @@ public: /// Default constructor VFIterator(){} /// Constructor which associates the half-edge elementet with a face and its vertex - VFIterator(FaceType * _f, const int & _z){f = _f; z = _z;} + VFIterator(FaceType * _f, const int & _z){f = _f; z = _z; assert(z>=0 && "VFAdj must be initialized");} /// Constructor which takes a pointer to vertex - VFIterator(VertexType * _v){f = _v->VFp(); z = _v->VFi();} + VFIterator(VertexType * _v){f = _v->VFp(); z = _v->VFi(); assert(z>=0 && "VFAdj must be initialized");} VFIFaceType *& F() { return f;} int & I() { return z;}