In assignment operator: added check for assignment to self
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Dec 2007 10:45:54 +0000 (10:45 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Dec 2007 10:45:54 +0000 (10:45 +0000)
MUON/mapping/AliMpExMap.cxx

index 7807bdc..fa97db4 100644 (file)
@@ -152,6 +152,10 @@ AliMpExMap&
 AliMpExMap::operator=(const AliMpExMap& rhs)
 {
   /// Assignment operator
+
+  // check assignment to self
+  if (this == &rhs) return *this;
+
   rhs.Copy(*this);
   return *this;
 }