Skip to content

Commit

Permalink
Add check for empty geom in QgsGeos::closestPoint (#45635)
Browse files Browse the repository at this point in the history
  • Loading branch information
qgis-bot committed Oct 23, 2021
1 parent be6cb03 commit 74bf4cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeos.cpp
Expand Up @@ -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() )
{
return QgsGeometry();
}
Expand Down

0 comments on commit 74bf4cb

Please sign in to comment.