test existence of pointer before applying a method
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 27 Nov 2000 15:26:11 +0000 (15:26 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 27 Nov 2000 15:26:11 +0000 (15:26 +0000)
PHOS/AliPHOSv1.cxx

index 63958a0..da91a13 100644 (file)
@@ -448,8 +448,10 @@ void AliPHOSv1::ResetHits()
   // Yuri Kharlov, 28 September 2000
 
 
-  fTmpHits->Clear() ;
-  fNTmpHits = 0;
+  if ( fTmpHits ) {
+    fTmpHits->Clear() ;
+    fNTmpHits = 0;
+  }
 
   AliDetector::ResetHits();
   if ( strcmp(fGeom->GetName(),"IHEP") == 0 ) {