Skip to content

Commit 5a4eb4f

Browse files
committed
Prevent member access from nullptr
1 parent f6b75c9 commit 5a4eb4f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,10 @@ void SiPixelRawDataErrorSource::buildStructure(const edm::EventSetup &iSetup) {
196196
for (TrackerGeometry::DetContainer::const_iterator it = pDD->detsPXB().begin(); it != pDD->detsPXB().end(); it++) {
197197
const GeomDetUnit *geoUnit = dynamic_cast<const GeomDetUnit *>(*it);
198198
// check if it is a detUnit
199-
if (geoUnit == nullptr)
199+
if (geoUnit == nullptr) {
200200
LogError("PixelDQM") << "Pixel GeomDet is not a GeomDetUnit!" << std::endl;
201+
continue;
202+
}
201203
const PixelGeomDetUnit *pixDet = dynamic_cast<const PixelGeomDetUnit *>(geoUnit);
202204
int nrows = (pixDet->specificTopology()).nrows();
203205
int ncols = (pixDet->specificTopology()).ncolumns();

0 commit comments

Comments
 (0)