Fixed a crash in removeInternalTriangles() for models without normals.

This commit is contained in:
Don BURNS 2006-08-29 00:10:43 +00:00
parent 6be6bc2eaa
commit f74d3af391

View File

@ -1053,7 +1053,9 @@ void DelaunayTriangulator::removeInternalTriangles(DelaunayConstraint *dc )
// and move to the constraint line to make an alternative geometry,
// possibly with alternative texture, and texture map
int ndel=0;
osg::Vec3Array::iterator normitr = normals_->begin();
osg::Vec3Array::iterator normitr;
if( normals_.valid() )
normitr = normals_->begin();
// osg::notify(osg::WARN) << "DelaunayTriangulator: removeinternals, " << std::endl;
for (osg::DrawElementsUInt::iterator triit=prim_tris_->begin(); triit!=prim_tris_->end(); )