Skip to content
Permalink
Browse files
Add check for empty geom in QgsGeos::closestPoint
  • Loading branch information
s-knibbs authored and github-actions committed Oct 23, 2021
1 parent be6cb03 commit c935ab6f5eaf29756a6e6df752ac775dd1c48b36
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/geometry/qgsgeos.cpp
@@ -2216,7 +2216,7 @@ QgsGeometry QgsGeos::mergeLines( QString *errorMsg ) const

QgsGeometry QgsGeos::closestPoint( const QgsGeometry &other, QString *errorMsg ) const
{
if ( !mGeos || isEmpty() || other.isNull() )
if ( !mGeos || isEmpty() || other.isEmpty() || other.isNull() )
{
return QgsGeometry();
}

0 comments on commit c935ab6

Please sign in to comment.