Test on PHOSloader existence added to destr.
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Sep 2004 09:38:15 +0000 (09:38 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Sep 2004 09:38:15 +0000 (09:38 +0000)
PHOS/AliPHOSPID.cxx
PHOS/AliPHOSTrackSegmentMaker.cxx

index d4e02e7..4d64c1d 100644 (file)
@@ -62,6 +62,7 @@ AliPHOSPID::~AliPHOSPID()
 {
   // dtor
  //Remove this from the parental task before destroying
-  AliPHOSGetter::Instance()->PhosLoader()->CleanPIDTask();
+  if(AliPHOSGetter::Instance()->PhosLoader())
+    AliPHOSGetter::Instance()->PhosLoader()->CleanPIDTask();
 }
 
index 39851c4..0f3ea3b 100644 (file)
@@ -56,6 +56,7 @@ AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(const TString alirunFileName,
 AliPHOSTrackSegmentMaker::~AliPHOSTrackSegmentMaker()
 {
  //Remove this from the parental task before destroying
-  AliPHOSGetter::Instance()->PhosLoader()->CleanTracker();
+  if(AliPHOSGetter::Instance()->PhosLoader())
+    AliPHOSGetter::Instance()->PhosLoader()->CleanTracker();
 }