From 101e46bc6bfa12c79c236a7c1fef4e036c3a7bd5 Mon Sep 17 00:00:00 2001 From: ganovelli Date: Wed, 1 Sep 2010 17:16:43 +0000 Subject: [PATCH] bug corrected. attribute member "_padding" was not initialized in Add*Attribute --- vcg/complex/trimesh/allocate.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vcg/complex/trimesh/allocate.h b/vcg/complex/trimesh/allocate.h index a9b57772..8070d999 100644 --- a/vcg/complex/trimesh/allocate.h +++ b/vcg/complex/trimesh/allocate.h @@ -866,7 +866,8 @@ public: assert(i ==m.edge_attr.end() );// an attribute with this name exists } h._sizeof = sizeof(ATTR_TYPE); - h._typename = typeid(ATTR_TYPE).name(); + h._padding = 0; + h._typename = typeid(ATTR_TYPE).name(); h._handle = (void*) new SimpleTempData(m.edge); m.attrn++; h.n_attr = m.attrn; @@ -952,7 +953,8 @@ public: } h._typename = typeid(ATTR_TYPE).name(); h._sizeof = sizeof(ATTR_TYPE); - h._handle = (void*) new SimpleTempData(m.face); + h._padding = 0; + h._handle = (void*) new SimpleTempData(m.face); m.attrn++; h.n_attr = m.attrn; std::pair < AttrIterator , bool> res = m.face_attr.insert(h); @@ -1044,6 +1046,7 @@ public: } h._typename = typeid(ATTR_TYPE).name(); h._sizeof = sizeof(ATTR_TYPE); + h._padding = 0; h._handle = (void*) new Attribute(); m.attrn++; h.n_attr = m.attrn;