Bug 797583 - gnc:book-add-quotes crashes when there are no quotes

When Get Quotes being run on empty book, the gnc:book-add-quotes
function expects book->commodity->fq-call-data to return #f
This commit is contained in:
Christopher Lam 2020-03-28 09:18:54 +08:00
parent ed2437e427
commit f05128b2c2

View File

@ -199,10 +199,11 @@
commodity-list)
;; Now translate to just what gnc-fq-helper expects.
(and (or (pair? currency-list-filtered) (pair? commodity-list))
(append
(hash-map->list cons commodity-hash)
(map (lambda (cmd) (cons (car cmd) (list (cdr cmd))))
currency-list-filtered)))))
currency-list-filtered))))))
(define (fq-call-data->fq-calls fq-call-data)
;; take an output element from book->commodity->fq-call-data and