Skip to content

Commit 249907a

Browse files
authored
Merge pull request #48348 from iarspider/iarspider-patches-20250617-2
Do not access itr->second if itr is invalid
2 parents aa687e8 + 404f5fc commit 249907a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Geometry/HGCalCommonData/src/HGCalDDDConstants.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,8 +1533,8 @@ bool HGCalDDDConstants::tileExist(int zside, int layer, int ring, int phi) const
15331533
edm::LogWarning("HGCalGeomT") << "TileExist:input " << zside << ":" << layer << ":" << ring << ":" << phi
15341534
<< " Index flag " << indx << ":" << (itr != hgpar_->tileInfoMap_.end()) << " ok "
15351535
<< ok;
1536-
if (HGCalTileIndex::tileFineExist(itr->second.hex, zside, phi) !=
1537-
HGCalTileIndex::tileExist(itr->second.hex, zside, phi))
1536+
else if (HGCalTileIndex::tileFineExist(itr->second.hex, zside, phi) !=
1537+
HGCalTileIndex::tileExist(itr->second.hex, zside, phi))
15381538
edm::LogVerbatim("HGCalGeom") << "Zside:Layer:Ring:Phi " << zside << ":" << layer << ":" << ring << ":" << phi
15391539
<< " hex " << std::hex << itr->second.hex[0] << ":" << itr->second.hex[1] << ":"
15401540
<< itr->second.hex[2] << ":" << itr->second.hex[3] << ":" << itr->second.hex[4]

0 commit comments

Comments
 (0)