Bug 798221 - Transfer funds between accounts with different currencies crashes Gnucash on macOS

In the scrub function find_account_matching_name_in_list there was a
test for account names being the same for currency but condition was
backwards so was matching on account names being different. There was
also a g_list_free resulting in a double free which was removed.
pull/1072/head
Robert Fewell 5 years ago
parent 38c0163431
commit 0f026f6a10

@ -1434,11 +1434,8 @@ find_account_matching_name_in_list (GList *acc_list, const char* accname)
{
Account *acc = GNC_ACCOUNT (node->data);
if (G_UNLIKELY (!acc)) continue;
if (g_strcmp0 (accname, xaccAccountGetName(acc)))
{
g_list_free (acc_list);
if (g_strcmp0 (accname, xaccAccountGetName (acc)) == 0)
return acc;
}
}
return NULL;
}

Loading…
Cancel
Save