gnucash maint: Bug 798221 - Transfer funds between accounts with different currencies crashes Gnucash on macOS
Robert Fewell
bobit at code.gnucash.org
Thu Jul 8 04:40:31 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/0f026f6a (commit)
from https://github.com/Gnucash/gnucash/commit/38c01634 (commit)
commit 0f026f6a100e336b1f6a41ab1556d3d79f232e64
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Thu Jul 8 09:33:10 2021 +0100
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.
diff --git a/libgnucash/engine/Scrub.c b/libgnucash/engine/Scrub.c
index 88965cefb..888378cde 100644
--- a/libgnucash/engine/Scrub.c
+++ b/libgnucash/engine/Scrub.c
@@ -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;
}
Summary of changes:
libgnucash/engine/Scrub.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
More information about the gnucash-changes
mailing list