diff --git a/slsDetectorSoftware/src/DetectorImpl.cpp b/slsDetectorSoftware/src/DetectorImpl.cpp index c40c163fc..b334c3cfb 100644 --- a/slsDetectorSoftware/src/DetectorImpl.cpp +++ b/slsDetectorSoftware/src/DetectorImpl.cpp @@ -1977,7 +1977,7 @@ void DetectorImpl::setBadChannels(const std::vector list, Positions pos) { // update to multi values if multi modules if (isAllPositions(pos)) { - std::vector> badchannels; + std::vector> badchannels(modules.size()); int nchan = modules[0]->getNumberOfChannels().x; if (shm()->detType == MYTHEN3) { // assuming single counter @@ -1996,16 +1996,9 @@ void DetectorImpl::setBadChannels(const std::vector list, Positions pos) { std::to_string(badchannel) + " out of bounds."); } - if (badchannels.size() != imod + 1) { - badchannels.push_back(std::vector{}); - } badchannels[imod].push_back(ch); } for (size_t imod = 0; imod != modules.size(); ++imod) { - // add empty vector if no bad channels in this module - if (badchannels.size() != imod + 1) { - badchannels.push_back(std::vector{}); - } Parallel(&Module::setBadChannels, {static_cast(imod)}, badchannels[imod]); }