Fix crash in customer/employee/vendor reports.

This commit is contained in:
John Ralls 2017-12-29 14:23:27 -08:00
parent 3c65a30017
commit 47a422070e

View File

@ -757,13 +757,12 @@
(gnc:date-option-absolute-time
(opt-val gnc:pagename-general optname-to-date))))
(book (gnc-account-get-book account))
(date-format (gnc:options-fancy-date book))
(date-format (if (not (null? book)) (gnc:options-fancy-date book)))
(type (opt-val "__reg" "owner-type"))
(owner-descr (owner-string type))
(date-type (opt-val gnc:pagename-general optname-date-driver))
(owner (opt-val owner-page owner-descr))
(report-title (string-append (doctype-str type) " " (_ "Report"))))
(if (not (gncOwnerIsValid owner))
(gnc:html-document-add-object!
document