diff --git a/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLHarvester.cc b/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLHarvester.cc index 6537b4e41930f..9d83de340bd53 100644 --- a/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLHarvester.cc +++ b/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLHarvester.cc @@ -258,6 +258,9 @@ void SiStripGainsPCLHarvester::gainQualityMonitor(DQMStore::IBooker& ibooker_, if (Gain != 1.) { std::vector charge_histos = APVGain::FetchMonitor(new_charge_histos, DetId, tTopo_); + + if (!Charge_Vs_Index) + continue; TH2S* chvsidx = (Charge_Vs_Index)->getTH2S(); int bin = chvsidx->GetXaxis()->FindBin(Index); TH1D* Proj = chvsidx->ProjectionY("proj", bin, bin);