diff --git a/src/osgPlugins/bsp/VBSPGeometry.cpp b/src/osgPlugins/bsp/VBSPGeometry.cpp index 23ccf3305..1273c7e34 100644 --- a/src/osgPlugins/bsp/VBSPGeometry.cpp +++ b/src/osgPlugins/bsp/VBSPGeometry.cpp @@ -653,7 +653,7 @@ ref_ptr VBSPGeometry::createGeometry() // Now, stripify the geode to convert the POLYGON primitives to // triangle strips - osgUtil::optimizeMesh(geode); + osgUtil::optimizeMesh(geode.get()); } // Now do the same for the displacement surfaces (if any) diff --git a/src/osgPlugins/stl/ReaderWriterSTL.cpp b/src/osgPlugins/stl/ReaderWriterSTL.cpp index a4cae46fc..d27048ce2 100644 --- a/src/osgPlugins/stl/ReaderWriterSTL.cpp +++ b/src/osgPlugins/stl/ReaderWriterSTL.cpp @@ -182,7 +182,7 @@ private: geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::TRIANGLES, 0, _numFacets * 3)); if(!_noTriStripPolygons) { - osgUtil::optimizeMesh(geom); + osgUtil::optimizeMesh(geom.get()); } return geom;