Bug fix in assignment operator.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Mar 2011 18:05:59 +0000 (18:05 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Mar 2011 18:05:59 +0000 (18:05 +0000)
C. Loizides

STEER/AliAODCaloCells.cxx

index 7a6ce92..005212a 100644 (file)
@@ -57,7 +57,14 @@ AliAODCaloCells& AliAODCaloCells::operator=(const AliAODCaloCells& cells)
 {
     // Assignment operator
   if(&cells == this) return *this;
+  delete [] fCellNumber;
+  delete [] fAmplitude;
+
   fNCells = cells.fNCells;
+
+  fCellNumber = new Short_t[fNCells];
+  fAmplitude  = new Double32_t[fNCells];
+
   for (Int_t i = 0; i < fNCells; i++) {
     fCellNumber[i]    = cells.fCellNumber[i];
     fAmplitude[i]     = cells.fAmplitude[i];