mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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.
This commit is contained in:
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…
Reference in New Issue
Block a user