]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added protection against adding new fPID array in bwd-compatibity rule of AODLinkDef...
authorshahoian <ruben.shahoyan@cern.ch>
Sat, 19 Apr 2014 15:19:29 +0000 (17:19 +0200)
committershahoian <ruben.shahoyan@cern.ch>
Sat, 19 Apr 2014 15:20:08 +0000 (17:20 +0200)
STEER/AOD/AliAODTrack.cxx
STEER/AODLinkDef.h

index 81771a17899f4bb917422ea7a0e3e81a509325de..1d4985d683974d766aad01ae61037d453260c484 100644 (file)
@@ -218,7 +218,7 @@ AliAODTrack::~AliAODTrack()
   delete fCovMatrix;
   delete fDetPid;
   delete fDetectorPID;
-  delete[] fPID;
+  if (fPID) {delete[] fPID; fPID = 0;}
 }
 
 
index 30842944fb15a5b82307fa9956060e7bebc79ebd..e33625991592786fa3e50791a10c2fc78622aac2 100644 (file)
@@ -31,7 +31,7 @@
 
 #pragma read sourceClass="AliAODTrack" targetClass="AliAODTrack" source="Double32_t fPID[10]"  version="[-22]" \
  target="fPID" targetType="Double32_t*" \
-   code="{fPID = new Double32_t[10];for(Int_t isp=10;isp--;) fPID[isp]=onfile.fPID[isp];}"
+  code="{if (!fPID) fPID = new Double32_t[10];for(Int_t isp=10;isp--;) fPID[isp]=onfile.fPID[isp];}"
 
 #pragma link C++ class AliAODTrack+;