Skip to content
Permalink
Browse files

Fix crash in QgsCompoundCurve equality operator

  • Loading branch information
nyalldawson committed Sep 19, 2017
1 parent 1540448 commit e6a0af5a9b84455157e4a1b7d33c7b0798e4fb1a
Showing with 13 additions and 1 deletion.
  1. +13 −1 src/core/geometry/qgscompoundcurve.cpp
@@ -41,7 +41,19 @@ bool QgsCompoundCurve::operator==( const QgsCurve &other ) const
if ( !otherCurve )
return false;

return *otherCurve == *this;
if ( mWkbType != otherCurve->mWkbType )
return false;

if ( mCurves.size() != otherCurve->mCurves.size() )
return false;

for ( int i = 0; i < mCurves.size(); ++i )
{
if ( *mCurves.at( i ) != *otherCurve->mCurves.at( i ) )
return false;
}

return true;
}

bool QgsCompoundCurve::operator!=( const QgsCurve &other ) const

0 comments on commit e6a0af5

Please sign in to comment.
You can’t perform that action at this time.