From 8bf114f25e6cd05f900b55979243b13c2eabd482 Mon Sep 17 00:00:00 2001 From: fca Date: Mon, 16 Jan 2012 13:08:21 +0000 Subject: [PATCH] Fixing coverity 18135 --- STEER/STEERBase/AliVEventPool.cxx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/STEER/STEERBase/AliVEventPool.cxx b/STEER/STEERBase/AliVEventPool.cxx index df36bb95e2c..9d8697d5b9a 100644 --- a/STEER/STEERBase/AliVEventPool.cxx +++ b/STEER/STEERBase/AliVEventPool.cxx @@ -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; } -- 2.43.0