Skip to content

Commit e6a0af5

Browse files
committedSep 19, 2017
Fix crash in QgsCompoundCurve equality operator
1 parent 1540448 commit e6a0af5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed
 

‎src/core/geometry/qgscompoundcurve.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,19 @@ bool QgsCompoundCurve::operator==( const QgsCurve &other ) const
4141
if ( !otherCurve )
4242
return false;
4343

44-
return *otherCurve == *this;
44+
if ( mWkbType != otherCurve->mWkbType )
45+
return false;
46+
47+
if ( mCurves.size() != otherCurve->mCurves.size() )
48+
return false;
49+
50+
for ( int i = 0; i < mCurves.size(); ++i )
51+
{
52+
if ( *mCurves.at( i ) != *otherCurve->mCurves.at( i ) )
53+
return false;
54+
}
55+
56+
return true;
4557
}
4658

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

0 commit comments

Comments
 (0)
Please sign in to comment.