From kde-commits Fri Sep 12 20:47:25 2008 From: David Jarvie Date: Fri, 12 Sep 2008 20:47:25 +0000 To: kde-commits Subject: branches/KDE/3.5/kdepim/libkcal Message-Id: <1221252445.801123.23005.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=122125245613099 SVN commit 860376 by djarvie: Backport of revision 859714, 859717 by Kevin Krammer Always check for self assignment in operator=(), especially when clearing things prior to copying or when juggling pointers M +2 -0 incidence.cpp --- branches/KDE/3.5/kdepim/libkcal/incidence.cpp #860375:860376 @@ -107,6 +107,8 @@ Incidence& Incidence::operator=( const Incidence &i ) { + if ( &i == this ) + return *this; IncidenceBase::operator=( i ); mRevision = i.mRevision; mCreated = i.mCreated;