Skip to content

Commit

Permalink
[budget] fixcrash: fix crasher for some periods
Browse files Browse the repository at this point in the history
eg. the following combo would previously crash:
- periods from next to current
- use accumulated amounts
  • Loading branch information
christopherlam committed Oct 3, 2019
1 parent 5d15fd4 commit f015a96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnucash/report/standard-reports/budget.scm
Expand Up @@ -332,7 +332,7 @@
(let* ((comm (xaccAccountGetCommodity acct))
(reverse-balance? (gnc-reverse-balance acct))
(allperiods (filter number? (gnc:list-flatten column-list)))
(total-periods (if accumulate?
(total-periods (if (and accumulate? (not (null? allperiods)))
(iota (1+ (apply max allperiods)))
allperiods))
(income-acct? (eqv? (xaccAccountGetType acct) ACCT-TYPE-INCOME)))
Expand Down

0 comments on commit f015a96

Please sign in to comment.