diff --git a/src/osgUtil/SmoothingVisitor.cpp b/src/osgUtil/SmoothingVisitor.cpp index cf0693bfc..4b0cfa111 100644 --- a/src/osgUtil/SmoothingVisitor.cpp +++ b/src/osgUtil/SmoothingVisitor.cpp @@ -657,14 +657,16 @@ static void smooth_new(osg::Geometry& geom, double creaseAngle) // fsef.listProblemVertices(); fsef.updateGeometry(); + vertices = dynamic_cast(geom.getVertexArray()); + normals = dynamic_cast(geom.getNormalArray()); osg::TriangleIndexFunctor stif2; if (stif2.set(vertices, normals)) { // accumulate all the normals - geom.accept(stif); + geom.accept(stif2); // normalize the normals - stif.normalize(); + stif2.normalize(); } }