]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixed initialization issue of fAODObjects after removal of its creation from the...
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Dec 2011 09:36:25 +0000 (09:36 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Dec 2011 09:36:25 +0000 (09:36 +0000)
STEER/AOD/AliAODEvent.cxx

index efa4f276cabc32e14ff0de7324aa435ad4c799b4..0c1fe8a6d71b522253bc0f0a442287393fbfc08c 100644 (file)
@@ -258,6 +258,10 @@ void AliAODEvent::AddObject(TObject* obj)
   // Please be aware that in order to increase performance you should
   // refrain from using TObjArrays (if possible). Use TClonesArrays, instead.
   
+  if ( !fAODObjects ) {
+     fAODObjects = new TList();
+     fAODObjects->SetOwner();
+  }
   if ( !fAODObjects->FindObject(obj) ) 
   {
     fAODObjects->AddLast(obj);