AUDIT: r20525 - gnucash/trunk/src/report/report-system - Fix warning about NULL guid_list in xaccQueryAddAccountGUIDMatch, which caused some total amounts in reports to disappear.
Christian Stimming
cstim at code.gnucash.org
Sun Apr 3 16:16:48 EDT 2011
Author: cstim
Date: 2011-04-03 16:16:47 -0400 (Sun, 03 Apr 2011)
New Revision: 20525
Trac: http://svn.gnucash.org/trac/changeset/20525
Modified:
gnucash/trunk/src/report/report-system/report-utilities.scm
Log:
Fix warning about NULL guid_list in xaccQueryAddAccountGUIDMatch, which caused some total amounts in reports to disappear.
Apparently gnc:account-get-trans-type-splits-interval didn't watch out
for empty lists of accounts, and the resulting split list somehow
was bogus. Now that we check for empty account list, all is fine again.
This was broken for some months by now, maybe since r20404?
BP
Modified: gnucash/trunk/src/report/report-system/report-utilities.scm
===================================================================
--- gnucash/trunk/src/report/report-system/report-utilities.scm 2011-04-03 16:47:43 UTC (rev 20524)
+++ gnucash/trunk/src/report/report-system/report-utilities.scm 2011-04-03 20:16:47 UTC (rev 20525)
@@ -823,6 +823,10 @@
;; where type is defined as an alist '((str "match me") (cased #f) (regexp #f))
(define (gnc:account-get-trans-type-splits-interval
account-list type start-date-tp end-date-tp)
+ (if (null? account-list)
+ ;; No accounts given. Return empty list.
+ '()
+ ;; The normal case: There are accounts given.
(let* ((query (qof-query-create-for-splits))
(splits #f)
(get-val (lambda (alist key)
@@ -847,6 +851,7 @@
splits
)
)
+ )
;; utility to assist with double-column balance tables
;; a request is made with the <req> argument
More information about the gnucash-changes
mailing list