Skip to content

Commit

Permalink
Fix segfault when point is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere authored and nyalldawson committed Sep 29, 2023
1 parent 75c177e commit d69a677
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/analysis/processing/qgsalgorithmpointstopaths.cpp
Expand Up @@ -255,8 +255,11 @@ QVariantMap QgsPointsToPathsAlgorithm::processAlgorithm( const QVariantMap &para
}
else
{
const QgsPoint point( *qgsgeometry_cast< const QgsPoint * >( geom ) );
allPoints[ groupValue ] << qMakePair( orderValue, point );
const QgsPoint *point = qgsgeometry_cast< const QgsPoint * >(geom);
if ( point )
{
allPoints[ groupValue ] << qMakePair( orderValue, *point );
}
}
}
++currentPoint;
Expand Down

0 comments on commit d69a677

Please sign in to comment.