mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-05 00:05:32 -04:00
Fix memory leak when restoring invalid geometry collection wkt
This commit is contained in:
parent
ba50bf043b
commit
f153613908
@ -530,7 +530,10 @@ bool QgsGeometryCollection::fromCollectionWkt( const QString &wkt, const QList<Q
|
|||||||
QPair<QgsWkbTypes::Type, QString> parts = QgsGeometryUtils::wktReadBlock( wkt );
|
QPair<QgsWkbTypes::Type, QString> parts = QgsGeometryUtils::wktReadBlock( wkt );
|
||||||
|
|
||||||
if ( QgsWkbTypes::flatType( parts.first ) != QgsWkbTypes::flatType( wkbType() ) )
|
if ( QgsWkbTypes::flatType( parts.first ) != QgsWkbTypes::flatType( wkbType() ) )
|
||||||
|
{
|
||||||
|
qDeleteAll( subtypes );
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
mWkbType = parts.first;
|
mWkbType = parts.first;
|
||||||
|
|
||||||
QString defChildWkbType = QStringLiteral( "%1%2%3 " ).arg( defaultChildWkbType, is3D() ? "Z" : "", isMeasure() ? "M" : "" );
|
QString defChildWkbType = QStringLiteral( "%1%2%3 " ).arg( defaultChildWkbType, is3D() ? "Z" : "", isMeasure() ? "M" : "" );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user