Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Geom checker plugin: don't crash if feedback is 0x0
Fixes #21259
  • Loading branch information
elpaso committed Feb 18, 2019
1 parent b711ef0 commit 1f08a06
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -45,7 +45,7 @@ void QgsGeometryGapCheck::collectErrors( const QMap<QString, QgsFeaturePool *> &
{
geomList.append( layerFeature.geometry() );

if ( feedback->isCanceled() )
if ( feedback && feedback->isCanceled() )
{
geomList.clear();
break;
Expand Down
Expand Up @@ -43,7 +43,7 @@ void QgsGeometryMissingVertexCheck::collectErrors( const QMap<QString, QgsFeatur

for ( const QgsGeometryCheckerUtils::LayerFeature &layerFeature : layerFeatures )
{
if ( feedback->isCanceled() )
if ( feedback && feedback->isCanceled() )
{
break;
}
Expand Down Expand Up @@ -152,7 +152,7 @@ void QgsGeometryMissingVertexCheck::processPolygon( const QgsCurvePolygon *polyg

if ( featurePool->getFeature( fid, compareFeature, feedback ) )
{
if ( feedback->isCanceled() )
if ( feedback && feedback->isCanceled() )
break;

QgsVertexIterator vertexIterator = compareFeature.geometry().vertices();
Expand Down
Expand Up @@ -35,7 +35,7 @@ void QgsGeometryOverlapCheck::collectErrors( const QMap<QString, QgsFeaturePool
QList<QString> layerIds = featureIds.keys();
for ( const QgsGeometryCheckerUtils::LayerFeature &layerFeatureA : layerFeaturesA )
{
if ( feedback->isCanceled() )
if ( feedback && feedback->isCanceled() )
break;

// Ensure each pair of layers only gets compared once: remove the current layer from the layerIds, but add it to the layerList for layerFeaturesB
Expand All @@ -52,7 +52,7 @@ void QgsGeometryOverlapCheck::collectErrors( const QMap<QString, QgsFeaturePool
const QgsGeometryCheckerUtils::LayerFeatures layerFeaturesB( featurePools, QList<QString>() << layerFeatureA.layer()->id() << layerIds, bboxA, compatibleGeometryTypes(), mContext );
for ( const QgsGeometryCheckerUtils::LayerFeature &layerFeatureB : layerFeaturesB )
{
if ( feedback->isCanceled() )
if ( feedback && feedback->isCanceled() )
break;

// > : only report overlaps within same layer once
Expand Down

0 comments on commit 1f08a06

Please sign in to comment.