]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCcalibDB.cxx
fix pointer handling (crash in case no GRP available)
[u/mrichter/AliRoot.git] / TPC / AliTPCcalibDB.cxx
index 00dfa85d6df5874f98dbd38aab515dbec6b5c3b4..6408eb01577370077e7e59035e8237322f0124eb 100644 (file)
@@ -1507,8 +1507,13 @@ void AliTPCcalibDB::UpdateChamberHighVoltageData()
   // start and end time of the run
   const Int_t run=GetRun();
   if (run<0) return;
-  const Int_t startTimeGRP = GetGRP(run)->GetTimeStart();
-  const Int_t stopTimeGRP  = GetGRP(run)->GetTimeEnd();
+
+  // if no valid run information - return
+  AliGRPObject* grp = GetGRP(run);
+  if (!grp) return;
+
+  const Int_t startTimeGRP = grp->GetTimeStart();
+  const Int_t stopTimeGRP  = grp->GetTimeEnd();
 
   //
   // check active state by analysing the scalers