summaryrefslogtreecommitdiffstats
path: root/kmymoney2/views/khomeview.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-01-14 14:08:52 -0600
committerTimothy Pearson <[email protected]>2012-01-14 14:08:52 -0600
commit8654cea10f6902719006d5975db7dc07b2fcc713 (patch)
tree6cf0608a089c234056746a467f739722687b645a /kmymoney2/views/khomeview.cpp
parent2a54aa58cfe166f48d6f1395cbc6c9bfd5e31bfc (diff)
downloadkmymoney-8654cea10f6902719006d5975db7dc07b2fcc713.tar.gz
kmymoney-8654cea10f6902719006d5975db7dc07b2fcc713.zip
Update to upstream stable version 1.0.5
Diffstat (limited to 'kmymoney2/views/khomeview.cpp')
-rw-r--r--kmymoney2/views/khomeview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/kmymoney2/views/khomeview.cpp b/kmymoney2/views/khomeview.cpp
index 60bb173..8745d64 100644
--- a/kmymoney2/views/khomeview.cpp
+++ b/kmymoney2/views/khomeview.cpp
@@ -595,6 +595,13 @@ void KHomeView::showPayments(void)
schedule.remove(it);
continue;
}
+
+ //if nextPayment returns an invalid date, setNextDueDate will just skip it, resulting in a loop
+ //we check the resulting date and erase the schedule if invalid
+ if(!((*it).nextPayment((*it).nextDueDate())).isValid()) {
+ schedule.remove(it);
+ continue;
+ }
(*it).setNextDueDate((*it).nextPayment((*it).nextDueDate()));
qBubbleSort(schedule);