Skip to content

Commit

Permalink
Add check for self assignment to the = operator
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@5100 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Mar 26, 2006
1 parent 69a6f68 commit be1e198
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/qgsgeometryvertexindex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ QgsGeometryVertexIndex::QgsGeometryVertexIndex( QgsGeometryVertexIndex const & r

QgsGeometryVertexIndex & QgsGeometryVertexIndex::operator=( QgsGeometryVertexIndex const & rhs )
{
mIndex = rhs.mIndex;
if(&rhs != this)
{
mIndex = rhs.mIndex;
}
return *this;
}

Expand Down

0 comments on commit be1e198

Please sign in to comment.