ResetTimeSteps():

Check paymentOptionIndex for correct value.
This commit is contained in:
Gerhard Hoffmann 2024-07-29 11:20:00 +02:00
parent dbf5b1f11d
commit 31b1dd1690

View File

@ -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<int> 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<int>();