Skip to content

Commit 03faafa

Browse files
committedNov 23, 2014
Make the "Merge shapefiles" tool correctly handle features without geometries.
1 parent 50d2a74 commit 03faafa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎python/plugins/fTools/tools/doMergeShapes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,9 @@ def run( self ):
317317
mergedAttrs[ fieldMap[shapeIndex][fieldIndex] ] = v
318318
fieldIndex += 1
319319

320-
inGeom = QgsGeometry( inFeat.geometry() )
321-
outFeat.setGeometry( inGeom )
320+
if inFeat.geometry() is not None:
321+
inGeom = QgsGeometry( inFeat.geometry() )
322+
outFeat.setGeometry( inGeom )
322323
outFeat.setAttributes( mergedAttrs )
323324
writer.addFeature( outFeat )
324325
self.emit( SIGNAL( "featureProcessed()" ) )

0 commit comments

Comments
 (0)
Please sign in to comment.