From bd7b77b9002327b702f9e7b286b8f3a4dc6e0b41 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sun, 27 Dec 2020 11:01:07 +0800 Subject: [PATCH] [dialog-account] don't use xaccAccountCountSplits --- gnucash/gnome-utils/dialog-account.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnucash/gnome-utils/dialog-account.c b/gnucash/gnome-utils/dialog-account.c index cd2da43f41b..21e839ea9a0 100644 --- a/gnucash/gnome-utils/dialog-account.c +++ b/gnucash/gnome-utils/dialog-account.c @@ -211,7 +211,7 @@ gnc_account_opening_balance_button_update (AccountWindow *aw, gnc_commodity *com { Account *account = aw_get_account (aw); Account *ob_account = gnc_account_lookup_by_opening_balance (gnc_book_get_root_account (aw->book), commodity); - gboolean has_splits = xaccAccountCountSplits (account, FALSE) > 0; + gboolean has_splits = (xaccAccountGetSplitList (account) != NULL); if (xaccAccountGetType (account) != ACCT_TYPE_EQUITY) {