diff --git a/src/osgPlugins/gles/GeometrySplitterVisitor b/src/osgPlugins/gles/GeometrySplitterVisitor index ba64d9692..da7ce1b5f 100644 --- a/src/osgPlugins/gles/GeometrySplitterVisitor +++ b/src/osgPlugins/gles/GeometrySplitterVisitor @@ -285,11 +285,13 @@ protected: return; } - for(unsigned int i = 0 ; i < lines.size() ; ++ i) { + for(unsigned int i = 0 ; i < lines.size() ; ++ i) + { const osg::DrawElementsUInt* line = dynamic_cast(lines[i].get()); - if(!line || line->getMode() != osg::PrimitiveSet::LINES) { - osg::notify(osg::INFO) << "Primitive with bad mode flagged as wireframe. Skipping." - << std::endl; + if(!line || line->getMode() != osg::PrimitiveSet::LINES) + { + osg::notify(osg::INFO) << "Primitive with bad mode flagged as wireframe. Skipping."<< std::endl; + continue; } osg::ref_ptr small = new osg::DrawElementsUInt(osg::PrimitiveSet::LINES); osg::ref_ptr large = new osg::DrawElementsUInt(osg::PrimitiveSet::LINES);