Skip to content

Commit

Permalink
Make sure the GlobalAlgBlk is not empty before accessing member data
Browse files Browse the repository at this point in the history
  • Loading branch information
apana committed Apr 13, 2018
1 parent 284548f commit 2e1cfc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.cc
Expand Up @@ -410,7 +410,7 @@ void L1TGlobalProducer::produce(edm::Event& iEvent, const edm::EventSetup& evSet
edm::Handle<BXVector<GlobalAlgBlk>> m_uGtAlgBlk;
iEvent.getByToken(m_algoblkInputToken, m_uGtAlgBlk);

if(m_uGtAlgBlk.isValid()) {
if(m_uGtAlgBlk.isValid() && !m_uGtAlgBlk->isEmpty(0)) {
std::vector<GlobalAlgBlk>::const_iterator algBlk = m_uGtAlgBlk->begin(0);
m_prescaleSet=static_cast<unsigned int>(algBlk->getPreScColumn());
}else{
Expand Down

0 comments on commit 2e1cfc9

Please sign in to comment.