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/qgis@5100 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Mar 26, 2006
1 parent c9aa55b commit 72f97f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/qgsgeometryvertexindex.cpp
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 72f97f2

Please sign in to comment.