From fb27768aea2d470913ba05d5c4a731167f857dea Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Sun, 3 Apr 2011 20:16:47 +0000 Subject: [PATCH] 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 git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20525 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/report/report-system/report-utilities.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/report/report-system/report-utilities.scm b/src/report/report-system/report-utilities.scm index d38e354b64..0274b3392e 100644 --- a/src/report/report-system/report-utilities.scm +++ b/src/report/report-system/report-utilities.scm @@ -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 argument