diff --git a/SimMuon/MCTruth/plugins/SeedToTrackProducerBase.cc b/SimMuon/MCTruth/plugins/SeedToTrackProducerBase.cc index fb824635d83b0..8044b6f0040f2 100644 --- a/SimMuon/MCTruth/plugins/SeedToTrackProducerBase.cc +++ b/SimMuon/MCTruth/plugins/SeedToTrackProducerBase.cc @@ -65,8 +65,10 @@ void SeedToTrackProducerBase::produce(edm::StreamID, const std::vector *L2seeds = nullptr; if (L2seedsCollection.isValid()) L2seeds = L2seedsCollection.product(); - else + else { edm::LogError("SeedToTrackProducerBase") << "L2 seeds collection not found !! " << endl; + return; + } edm::Handle> seedHandle; iEvent.getByToken(L2seedsTagS_, seedHandle);