From e2907844be26d61914385e3932fe1de2ca31b588 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Tue, 10 Jul 2018 23:30:26 +0800 Subject: [PATCH] [customer-summary] prevents crash on empty-book with no accounts --- gnucash/report/business-reports/customer-summary.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnucash/report/business-reports/customer-summary.scm b/gnucash/report/business-reports/customer-summary.scm index b0384befe7..f6e05c5cf6 100644 --- a/gnucash/report/business-reports/customer-summary.scm +++ b/gnucash/report/business-reports/customer-summary.scm @@ -699,7 +699,7 @@ (expense-accounts (opt-val pagename-expenseaccounts optname-expenseaccounts)) (income-accounts (opt-val pagename-incomeaccounts optname-incomeaccounts)) (all-accounts (append income-accounts expense-accounts)) - (book (gnc-account-get-book (car all-accounts))) + (book (gnc-get-current-book)) (date-format (gnc:options-fancy-date book)) (type (opt-val "__reg" "owner-type")) (reverse? (opt-val "__reg" "reverse?"))