From 37791b608c6bcfff03365a01c1282419089e5975 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Tue, 19 Apr 2022 22:42:54 +0800 Subject: [PATCH] [gnc-plugin-page-register] if account==NULL, skip AccountIsPriced because gnc_plugin_page_register_ui_initial_state may be called for non-account registers (eg the sx editor) and account may be null, don't call xaccAccountIsPriced on null account. --- gnucash/gnome/gnc-plugin-page-register.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c index 136dd52b3e..dce7893b3f 100644 --- a/gnucash/gnome/gnc-plugin-page-register.c +++ b/gnucash/gnome/gnc-plugin-page-register.c @@ -1293,7 +1293,7 @@ gnc_plugin_page_register_ui_initial_state (GncPluginPageRegister* page) "visible", gnc_prefs_is_extra_enabled ()); gnc_plugin_update_actions (action_group, actions_requiring_priced_account, - "sensitive", xaccAccountIsPriced (account)); + "sensitive", account && xaccAccountIsPriced (account)); /* Set "style" radio button */ ledger_type = gnc_ledger_display_type (priv->ledger);