diff --git a/library/include/mobilisis/calculator_functions.h b/library/include/mobilisis/calculator_functions.h index c592678..050e0c6 100644 --- a/library/include/mobilisis/calculator_functions.h +++ b/library/include/mobilisis/calculator_functions.h @@ -40,12 +40,12 @@ public: } void ResetTimeSteps(int paymentOptionIndex) { - if (m_timeSteps.size() > 0) { + if (m_timeSteps.size() > 0 && paymentOptionIndex < m_timeSteps.size()) { m_timeSteps[paymentOptionIndex].clear(); } } QList timeSteps(int paymentOptionIndex=0) const { - if (m_timeSteps.size() > 0) { + if (m_timeSteps.size() > 0 && paymentOptionIndex < m_timeSteps.size()) { return m_timeSteps[paymentOptionIndex]; } return QList();