diff --git a/Code/Mantid/Framework/DataHandling/src/LoadIsawDetCal.cpp b/Code/Mantid/Framework/DataHandling/src/LoadIsawDetCal.cpp index 085772bd0358..8d1115e46ae1 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadIsawDetCal.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadIsawDetCal.cpp @@ -199,9 +199,11 @@ void LoadIsawDetCal::exec() { std::ostringstream Detbank; Detbank << "bank" << id; // Loop through detectors to match names with number from DetCal file + idnum = -1; for (int i = 0; i < static_cast(detList.size()); i++) if (detList[i]->getName().compare(Detbank.str()) == 0) idnum = i; + if (idnum < 0) continue; det = detList[idnum]; if (det) { IAlgorithm_sptr alg1 = createChildAlgorithm("ResizeRectangularDetector");