Skip to content

Commit bdb541f

Browse files
Kirill Naumovshahor02
authored andcommitted
ITS: Accounting for empty chipID vector after decoding
The current implementation causes a segfault for empty chipID vector
1 parent 7a2d390 commit bdb541f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction

Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction/RUDecodeData.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ int RUDecodeData::decodeROF(const Mapping& mp, const o2::InteractionRecord ir, b
120120
auto ID = chipData->getChipID();
121121
// Since the errored chips are not recorded, we need to add them
122122
// separately
123-
if (seenChipIDsInCable.back() != ID) {
123+
if (seenChipIDsInCable.empty() || seenChipIDsInCable.back() != ID) {
124124
seenChipIDsInCable.push_back(ID);
125125
}
126126
seenChips[ID] = chipData;

0 commit comments

Comments
 (0)