Skip to content

Commit

Permalink
Check if a point is a measure before returning its m value.
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Sep 28, 2020
1 parent ba33c3a commit 829ee25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -2380,6 +2380,9 @@ static QVariant fcnGeomM( const QVariantList &values, const QgsExpressionContext
if ( geom.isNull() )
return QVariant(); //or 0?

if ( !geom.constGet()->isMeasure() )
return QVariant();

//if single point, return the point's m value
if ( geom.type() == QgsWkbTypes::PointGeometry && !geom.isMultipart() )
{
Expand Down

0 comments on commit 829ee25

Please sign in to comment.