Skip to content

Commit

Permalink
Fix leak in QgsMultiSurface::asJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 19, 2017
1 parent 6fe89fd commit 0d6df12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/geometry/qgsmultisurface.cpp
Expand Up @@ -101,7 +101,7 @@ QString QgsMultiSurface::asJSON( int precision ) const
{
json += '[';

QgsPolygonV2 *polygon = static_cast<const QgsSurface *>( geom )->surfaceToPolygon();
std::unique_ptr< QgsPolygonV2 >polygon( static_cast<const QgsSurface *>( geom )->surfaceToPolygon() );

std::unique_ptr< QgsLineString > exteriorLineString( polygon->exteriorRing()->curveToLine() );
QgsPointSequence exteriorPts;
Expand Down

0 comments on commit 0d6df12

Please sign in to comment.