fix pointer allocation suggested by Andrei
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Jun 2010 06:32:19 +0000 (06:32 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Jun 2010 06:32:19 +0000 (06:32 +0000)
PWG1/TRD/AliTRDcheckDET.cxx

index 2cdfeb9..f0f5362 100644 (file)
@@ -1021,11 +1021,11 @@ TH1 *AliTRDcheckDET::PlotPHx(const AliTRDtrackV1 *track){
   // Plots the average pulse height vs the distance from the anode wire
   // (plus const anode wire offset)
   //
-  if(track) fkTrack = track;
-  if(!fkTrack){
+  if(!track){
     AliWarning("No Track defined.");
     return NULL;
   }
+  fkTrack = track;
   TProfile *h = NULL;
   if(!(h = dynamic_cast<TProfile *>(((TObjArray*)(fContainer->At(kPH)))->At(1)))){
     AliWarning("No Histogram defined.");