]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
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 2cdfeb943b38c26800a7f44420d602b3b334679a..f0f536277e2243a4d44e77da44ee297ad432f17e 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.");