From 90b78bd3f51d348374ea9d969ade455ebd70b743 Mon Sep 17 00:00:00 2001 From: Federico Montesino Pouzols <federico.montesino-pouzols@stfc.ac.uk> Date: Wed, 14 Oct 2015 08:27:46 +0100 Subject: [PATCH] check negative index, 1301217 , re #13951 --- Framework/LiveData/src/ISISHistoDataListener.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Framework/LiveData/src/ISISHistoDataListener.cpp b/Framework/LiveData/src/ISISHistoDataListener.cpp index d962ecea3ea..b211f601a4e 100644 --- a/Framework/LiveData/src/ISISHistoDataListener.cpp +++ b/Framework/LiveData/src/ISISHistoDataListener.cpp @@ -181,6 +181,10 @@ boost::shared_ptr<Workspace> ISISHistoDataListener::extractData() { getFloatArray("RRPB", floatBuffer, 32); const double protonCharge = floatBuffer[8]; + if (m_timeRegime < 0) + throw std::runtime_error("The value of the time regime variable is " + "negative. This is an Internal inconsistency."); + // find out the number of histograms in the output workspace const size_t numberOfHistograms = m_specList.empty() ? m_numberOfSpectra[m_timeRegime] : m_specList.size(); -- GitLab