[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/libkcal
From:       David Jarvie <software () astrojar ! org ! uk>
Date:       2008-09-12 20:47:25
Message-ID: 1221252445.801123.23005.nullmailer () svn ! kde ! org
[Download RAW message or body]

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;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic