Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix crash in QgsCompoundCurve equality operator
- Loading branch information
Showing
with
13 additions
and
1 deletion.
-
+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 |
|
|