Fix unreported crash with "fill ring" tool

unitialized smart ptr
This commit is contained in:
Alessandro Pasotti 2019-10-24 13:39:45 +02:00 committed by Nyall Dawson
parent 8b0e21219d
commit 4856304d69

View File

@ -129,7 +129,7 @@ void QgsMapToolFillRing::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
}
QgsLineString ext( pointList );
std::unique_ptr< QgsPolygon > polygon;
std::unique_ptr< QgsPolygon > polygon = qgis::make_unique< QgsPolygon >( );
polygon->setExteriorRing( ext.clone() );
g = QgsGeometry( std::move( polygon ) );
}