diff --git a/GeneratorInterface/RivetInterface/plugins/HTXSRivetProducer.cc b/GeneratorInterface/RivetInterface/plugins/HTXSRivetProducer.cc index 564a710855c8c..89a7bcc3558f4 100644 --- a/GeneratorInterface/RivetInterface/plugins/HTXSRivetProducer.cc +++ b/GeneratorInterface/RivetInterface/plugins/HTXSRivetProducer.cc @@ -163,7 +163,10 @@ void HTXSRivetProducer::produce(edm::Event& iEvent, const edm::EventSetup&) { } } -void HTXSRivetProducer::endRun(edm::Run const& iRun, edm::EventSetup const& es) { _HTXS->printClassificationSummary(); } +void HTXSRivetProducer::endRun(edm::Run const& iRun, edm::EventSetup const& es) { + if (_HTXS) + _HTXS->printClassificationSummary(); +} void HTXSRivetProducer::beginRun(edm::Run const& iRun, edm::EventSetup const& es) { if (_prodMode == "AUTO") {