Delete feature if add polygon not successfull

This commit is contained in:
Marco Hugentobler 2012-02-18 08:33:26 +01:00
parent 46f208fc22
commit a9a9b9394a

View File

@ -244,6 +244,7 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
if ( !g )
{
stopCapturing();
delete f;
return; // invalid geometry; one possibility is from duplicate points
}
f->setGeometry( g );