Error when creating a new account on expanded transaction

With the register in journal mode and you edit the account field so the
'Account x does not exist, do you want to create it' dialogue is shown
you get the following error...

gboolean boolean_from_key(const Account*, const std::vector<std::
__cxx11::basic_string<char> >&): assertion 'GNC_IS_ACCOUNT(acc)' failed

This was tracked down to a refresh being triggered with the account
dialogue so add a check for a valid account as part of the placeholder
test.
pull/539/head
Robert Fewell 7 years ago
parent 69f76c6378
commit aca8a734b0

@ -1969,7 +1969,7 @@ gnc_split_register_get_account_by_name (SplitRegister *reg, BasicCell * bcell,
g_free (account_name);
/* See if the account (either old or new) is a placeholder. */
if (xaccAccountGetPlaceholder (account))
if (account && xaccAccountGetPlaceholder (account))
{
gnc_error_dialog (GTK_WINDOW (gnc_split_register_get_parent (reg)),
placeholder, name);

Loading…
Cancel
Save