Add check for empty geom in QgsGeos::closestPoint (#45627)

This commit is contained in:
Simon J Knibbs 2021-10-23 03:58:44 +01:00 committed by GitHub
parent b56e86181c
commit 835f6d35f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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() )
{
return QgsGeometry();
}