Navigation Menu

Skip to content

Commit

Permalink
Add check for empty geom in QgsGeos::closestPoint
Browse files Browse the repository at this point in the history
  • Loading branch information
s-knibbs authored and github-actions[bot] committed Oct 23, 2021
1 parent d902269 commit 6197f03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeos.cpp
Expand Up @@ -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();
}
Expand Down

0 comments on commit 6197f03

Please sign in to comment.