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 d902269 commit 6197f0369ca167a6b2efa5bfa9c42379efb49610
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/geometry/qgsgeos.cpp
@@ -2510,7 +2510,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 6197f03

Please sign in to comment.