Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ int QgsVectorLayerEditUtils::addPart( const QList<QgsPoint> &points, QgsFeatureI
181
181
if ( !L->getFeatures ( QgsFeatureRequest ().setFilterFid ( featureId ).setSubsetOfAttributes ( QgsAttributeList () ) ).nextFeature ( f ) )
182
182
return 6 ; // not found
183
183
184
- if ( !f.constGeometry () )
184
+ if ( !f.constGeometry () || f. constGeometry ()-> isEmpty () )
185
185
{
186
186
// no existing geometry, so adding first part to null geometry
187
187
firstPart = true ;
@@ -220,7 +220,7 @@ int QgsVectorLayerEditUtils::addPart( QgsCurveV2* ring, QgsFeatureId featureId )
220
220
if ( !L->getFeatures ( QgsFeatureRequest ().setFilterFid ( featureId ).setSubsetOfAttributes ( QgsAttributeList () ) ).nextFeature ( f ) )
221
221
return 6 ; // not found
222
222
223
- if ( !f.constGeometry () )
223
+ if ( !f.constGeometry () || f. constGeometry ()-> isEmpty () )
224
224
{
225
225
// no existing geometry, so adding first part to null geometry
226
226
firstPart = true ;
0 commit comments