From fe57c40d6999a84e3538c3dd2b43cc382e72814b Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Thu, 21 Aug 2014 16:05:31 +0200 Subject: [PATCH] set seedCollection= nullptr before leaving the scope, else would assert/crash next call --- ...otonConversionTrajectorySeedProducerFromSingleLegAlgo.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RecoTracker/ConversionSeedGenerators/plugins/PhotonConversionTrajectorySeedProducerFromSingleLegAlgo.cc b/RecoTracker/ConversionSeedGenerators/plugins/PhotonConversionTrajectorySeedProducerFromSingleLegAlgo.cc index aab6f59523eb5..8be19b794e042 100644 --- a/RecoTracker/ConversionSeedGenerators/plugins/PhotonConversionTrajectorySeedProducerFromSingleLegAlgo.cc +++ b/RecoTracker/ConversionSeedGenerators/plugins/PhotonConversionTrajectorySeedProducerFromSingleLegAlgo.cc @@ -53,14 +53,14 @@ PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::find(const edm::Event & if (clustsOrZero){ if (!theSilentOnClusterCheck) edm::LogError("TooManyClusters") << "Found too many clusters (" << clustsOrZero << "), bailing out.\n"; - return ; + seedCollection= nullptr; return ; } edm::ESHandle handleMagField; setup.get().get(handleMagField); magField = handleMagField.product(); - if (unlikely(magField->inTesla(GlobalPoint(0.,0.,0.)).z()<0.01)) return; + if (unlikely(magField->inTesla(GlobalPoint(0.,0.,0.)).z()<0.01)){seedCollection= nullptr; return;} _IdealHelixParameters.setMagnField(magField); @@ -68,7 +68,7 @@ PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::find(const edm::Event & event.getByToken(token_vertex, vertexHandle); if (!vertexHandle.isValid() || vertexHandle->empty()){ edm::LogError("PhotonConversionFinderFromTracks") << "Error! Can't get the product primary Vertex Collection "<< _primaryVtxInputTag << "\n"; - return; + seedCollection= nullptr; return; } event.getByToken(token_bs,recoBeamSpotHandle);