summaryrefslogtreecommitdiffstats
path: root/kmymoney2/views/kgloballedgerview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/views/kgloballedgerview.cpp')
-rw-r--r--kmymoney2/views/kgloballedgerview.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/kmymoney2/views/kgloballedgerview.cpp b/kmymoney2/views/kgloballedgerview.cpp
index 8209d3f..e82459a 100644
--- a/kmymoney2/views/kgloballedgerview.cpp
+++ b/kmymoney2/views/kgloballedgerview.cpp
@@ -485,7 +485,12 @@ void KGlobalLedgerView::loadView(void)
break;
// for all others, we check if the next payment date is still 'in range'
- s.setNextDueDate(s.nextPayment(s.nextDueDate()));
+ TQDate nextDueDate = s.nextPayment(s.nextDueDate());
+ if (nextDueDate.isValid()) {
+ s.setNextDueDate(nextDueDate);
+ } else {
+ break;
+ }
}
scheduleList.pop_front();
}