gnucash maint: Multiple changes pushed
Mike Alexander
mta at code.gnucash.org
Tue Nov 17 19:10:16 EST 2015
Updated via https://github.com/Gnucash/gnucash/commit/d4bbede0 (commit)
via https://github.com/Gnucash/gnucash/commit/9b371153 (commit)
via https://github.com/Gnucash/gnucash/commit/104de595 (commit)
from https://github.com/Gnucash/gnucash/commit/3e7c8fa4 (commit)
commit d4bbede08f171211fd1dd3d6018c8f95dca86f34
Author: Mike Alexander <mta at umich.edu>
Date: Tue Nov 17 02:25:37 2015 -0500
Set val_imbalance in gnc_transaction_balance_trading.
When the code was refactored in 61973a8 the return value from the new
function gnc_transaction_get_commodity_imbalance was ignored. This had
the effect of using an uninitialized variable to set the value in a new
trading account split that is not for the transaction's currency. That
means that multicommodity transactions created with this bug and trading
accounts on will not be balanced.
diff --git a/src/engine/Scrub.c b/src/engine/Scrub.c
index c82b353..dc22b20 100644
--- a/src/engine/Scrub.c
+++ b/src/engine/Scrub.c
@@ -673,7 +673,7 @@ gnc_transaction_balance_trading (Transaction *trans, Account *root)
if (! gnc_commodity_equal (txn_curr, commodity))
{
- gnc_transaction_get_commodity_imbalance (trans, commodity);
+ val_imbalance = gnc_transaction_get_commodity_imbalance (trans, commodity);
}
xaccTransBeginEdit (trans);
commit 9b3711533fc7cd641eda8e9745013b2f8af81f85
Author: Mike Alexander <mta at umich.edu>
Date: Tue Nov 17 02:23:00 2015 -0500
Remove the code in on_matcher_ok_clicked that builds refs_list.
The use and release of refs_list was removed 7358bcc in August 2012 and
since then on_matcher_ok_clicked has been leaking a GSList on every call.
diff --git a/src/import-export/import-main-matcher.c b/src/import-export/import-main-matcher.c
index 3793212..3d60557 100644
--- a/src/import-export/import-main-matcher.c
+++ b/src/import-export/import-main-matcher.c
@@ -151,11 +151,8 @@ on_matcher_ok_clicked (GtkButton *button,
GNCImportMainMatcher *info)
{
GtkTreeModel *model;
- GtkTreePath *path;
- GtkTreeRowReference *ref;
GtkTreeIter iter;
GNCImportTransInfo *trans_info;
- GSList *refs_list = NULL;
g_assert (info);
@@ -177,11 +174,6 @@ on_matcher_ok_clicked (GtkButton *button,
if (gnc_import_process_trans_item(NULL, trans_info))
{
- path = gtk_tree_model_get_path(model, &iter);
- ref = gtk_tree_row_reference_new(model, path);
- refs_list = g_slist_append(refs_list, ref);
- gtk_tree_path_free(path);
-
if (info->transaction_processed_cb)
{
info->transaction_processed_cb(trans_info,
commit 104de59519bcff9d75aaa47998e964b6ede21f12
Author: Mike Alexander <mta at umich.edu>
Date: Tue Nov 17 02:21:27 2015 -0500
Avoid assert in gnc_split_register_balance_trans if default_account is null.
diff --git a/src/register/ledger-core/split-register-control.c b/src/register/ledger-core/split-register-control.c
index 793c956..39565a4 100644
--- a/src/register/ledger-core/split-register-control.c
+++ b/src/register/ledger-core/split-register-control.c
@@ -164,7 +164,7 @@ gnc_split_register_balance_trans (SplitRegister *reg, Transaction *trans)
g_list_free (radio_list);
- root = gnc_account_get_root(default_account);
+ root = default_account ? gnc_account_get_root(default_account) : NULL;
switch (choice)
{
default:
Summary of changes:
src/engine/Scrub.c | 2 +-
src/import-export/import-main-matcher.c | 8 --------
src/register/ledger-core/split-register-control.c | 2 +-
3 files changed, 2 insertions(+), 10 deletions(-)
More information about the gnucash-changes
mailing list