Skip to content

Commit

Permalink
Update src/core/expression/qgsexpressionfunction.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
  • Loading branch information
lbartoletti and nyalldawson committed Jul 28, 2021
1 parent 3e43023 commit 7cc0009
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -3576,7 +3576,7 @@ static QVariant fcnSinuosity( const QVariantList &values, const QgsExpressionCon
{
QgsGeometry geom = QgsExpressionUtils::getGeometry( values.at( 0 ), parent );
const QgsCurve *curve = qgsgeometry_cast< const QgsCurve * >( geom.constGet() );
if ( ( geom.type() != QgsWkbTypes::LineGeometry ) || !curve )
if ( !curve )
{
parent->setEvalErrorString( QObject::tr( "Function `sinuosity` requires a line geometry." ) );
return QVariant();
Expand Down

0 comments on commit 7cc0009

Please sign in to comment.