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
This commit is contained in:
Christian Stimming 2011-04-03 20:16:47 +00:00
parent cc632cff24
commit fb27768aea

View File

@ -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