]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing coverity 18135
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Jan 2012 13:08:21 +0000 (13:08 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Jan 2012 13:08:21 +0000 (13:08 +0000)
STEER/STEERBase/AliVEventPool.cxx

index df36bb95e2c7d56f816089cb5ec95a1eeafc0e50..9d8697d5b9ace04a92d3202ad4131536de7c3914 100644 (file)
@@ -44,16 +44,22 @@ AliVEventPool::AliVEventPool(const char* name, const char* title):
 
 AliVEventPool::AliVEventPool(const AliVEventPool& obj):
     TNamed(obj),
-    fChain(0)
+    fChain(obj.fChain)
 {
-    // Copy constructor
-    fChain = obj.fChain;
+  //
+  // Copy constructor
+  //
 }
 
 AliVEventPool& AliVEventPool::operator=(const AliVEventPool& other)
 {
-// Assignment operator
+  //
+  // Assignment operator
+  //
+  if(this != &other) {
     TNamed::operator=(other);
+    delete fChain;
     fChain = other.fChain;
-    return *this;
+  }
+  return *this;
 }