diff --git a/SimGeneral/Debugging/plugins/CaloParticleDebugger.cc b/SimGeneral/Debugging/plugins/CaloParticleDebugger.cc index 2324e3a8e62d8..70dfbec8656a2 100644 --- a/SimGeneral/Debugging/plugins/CaloParticleDebugger.cc +++ b/SimGeneral/Debugging/plugins/CaloParticleDebugger.cc @@ -309,6 +309,8 @@ void CaloParticleDebugger::fillSimHits(std::map& detIdToTotalSimEner hgtopo[1] = &(fhgeom->topology()); if (bhgeomnew) hgtopo[2] = &(bhgeomnew->topology()); + else + hgtopo[2] = nullptr; for (unsigned i = 0; i < 3; ++i) { if (hgtopo[i])