From ef5410aaf0916c9427a53ea5fa0c9c0749dbd8ac Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 3 Dec 2017 09:34:43 +0000 Subject: [PATCH] From Jordi Torres, fixed leak and inappropriate read bug --- src/osgPlugins/ogr/ReaderWriterOGR.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/osgPlugins/ogr/ReaderWriterOGR.cpp b/src/osgPlugins/ogr/ReaderWriterOGR.cpp index 5fed4aaea..6e27aa652 100644 --- a/src/osgPlugins/ogr/ReaderWriterOGR.cpp +++ b/src/osgPlugins/ogr/ReaderWriterOGR.cpp @@ -262,8 +262,6 @@ public: osg::Geometry* multiPointToDrawable(OGRMultiPoint* mpoint) const { - osg::Geometry* geom = new osg::Geometry; - osg::Geometry* pointGeom = new osg::Geometry(); osg::Vec3Array* vertices = new osg::Vec3Array(); @@ -286,7 +284,7 @@ public: if (pointGeom->getVertexArray()) { - OSG_INFO << "osgOgrFeature::multiPointToDrawable " << geom->getVertexArray()->getNumElements() << " vertexes"<< std::endl; + OSG_INFO << "osgOgrFeature::multiPointToDrawable " << pointGeom->getVertexArray()->getNumElements() << " vertexes"<< std::endl; } return pointGeom;