Skip to content

Commit 46c2d8b

Browse files
pblottierenyalldawson
authored andcommittedSep 29, 2023
Another safety check
1 parent d69a677 commit 46c2d8b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎src/analysis/processing/qgsalgorithmpointstopaths.cpp‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,16 @@ QVariantMap QgsPointsToPathsAlgorithm::processAlgorithm( const QVariantMap &para
249249
const QgsMultiPoint mp( *qgsgeometry_cast< const QgsMultiPoint * >( geom ) );
250250
for ( auto pit = mp.const_parts_begin(); pit != mp.const_parts_end(); ++pit )
251251
{
252-
const QgsPoint point( *qgsgeometry_cast< const QgsPoint * >( *pit ) );
253-
allPoints[ groupValue ] << qMakePair( orderValue, point );
252+
const QgsPoint *point = qgsgeometry_cast< const QgsPoint * >( *pit );
253+
if ( point )
254+
{
255+
allPoints[ groupValue ] << qMakePair( orderValue, *point );
256+
}
254257
}
255258
}
256259
else
257260
{
258-
const QgsPoint *point = qgsgeometry_cast< const QgsPoint * >(geom);
261+
const QgsPoint *point = qgsgeometry_cast< const QgsPoint * >( geom );
259262
if ( point )
260263
{
261264
allPoints[ groupValue ] << qMakePair( orderValue, *point );

0 commit comments

Comments
 (0)
Please sign in to comment.