Skip to content
Permalink
Browse files

[Geometry checker] Fix crashes in QgsGeometryGapCheck::mergeWithNeigh…

…bor due to using wrong layerId
  • Loading branch information
manisandro committed Oct 23, 2017
1 parent 4a6cdbe commit edf563b41447af00bbb933e3215afe97ea8ce8a7
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/analysis/vector/geometry_checker/qgsgeometrygapcheck.cpp
@@ -156,7 +156,7 @@ bool QgsGeometryGapCheck::mergeWithNeighbor( QgsGeometryGapCheckError *err, Chan
// Search for touching neighboring geometries
for ( const QString &layerId : err->neighbors().keys() )
{
QgsFeaturePool *featurePool = mContext->featurePools[ err->layerId() ];
QgsFeaturePool *featurePool = mContext->featurePools[ layerId ];
QgsAbstractGeometry *errLayerGeom = errGeometry->clone();
errLayerGeom->transform( featurePool->getLayerToMapTransform(), QgsCoordinateTransform::ReverseTransform );

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

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

return true;
}

0 comments on commit edf563b

Please sign in to comment.
You can’t perform that action at this time.