Skip to content

Commit

Permalink
[Geometry checker] Fix crashes in QgsGeometryGapCheck::mergeWithNeigh…
Browse files Browse the repository at this point in the history
…bor due to using wrong layerId
  • Loading branch information
manisandro committed Oct 23, 2017
1 parent 4a6cdbe commit edf563b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/analysis/vector/geometry_checker/qgsgeometrygapcheck.cpp
Expand Up @@ -156,7 +156,7 @@ bool QgsGeometryGapCheck::mergeWithNeighbor( QgsGeometryGapCheckError *err, Chan
// Search for touching neighboring geometries // Search for touching neighboring geometries
for ( const QString &layerId : err->neighbors().keys() ) for ( const QString &layerId : err->neighbors().keys() )
{ {
QgsFeaturePool *featurePool = mContext->featurePools[ err->layerId() ]; QgsFeaturePool *featurePool = mContext->featurePools[ layerId ];
QgsAbstractGeometry *errLayerGeom = errGeometry->clone(); QgsAbstractGeometry *errLayerGeom = errGeometry->clone();
errLayerGeom->transform( featurePool->getLayerToMapTransform(), QgsCoordinateTransform::ReverseTransform ); errLayerGeom->transform( featurePool->getLayerToMapTransform(), QgsCoordinateTransform::ReverseTransform );


Expand Down Expand Up @@ -205,7 +205,7 @@ bool QgsGeometryGapCheck::mergeWithNeighbor( QgsGeometryGapCheckError *err, Chan
} }


// Add merged polygon to destination geometry // Add merged polygon to destination geometry
replaceFeatureGeometryPart( err->layerId(), mergeFeature, mergePartIdx, combinedGeom, changes ); replaceFeatureGeometryPart( mergeLayerId, mergeFeature, mergePartIdx, combinedGeom, changes );


return true; return true;
} }
Expand Down

0 comments on commit edf563b

Please sign in to comment.