Skip to content

Commit

Permalink
No longer throws exception when detector is not found. Refs #4208.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Dec 8, 2011
1 parent 05392d6 commit 94e0564
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Code/Mantid/Framework/Geometry/src/Instrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,10 @@ namespace Mantid

bool Instrument::isDetectorMasked(const detid_t &detector_id) const
{
return m_instr->getDetector(detector_id)->isMasked();
detid2det_map::const_iterator it = m_detectorCache.find(detector_id);
if ( it == m_detectorCache.end() )
return false;
return it->second->isMasked();
}

bool Instrument::isDetectorMasked(const std::set<detid_t> &detector_ids) const
Expand Down

0 comments on commit 94e0564

Please sign in to comment.