gnucash stable: Multiple changes pushed
Christopher Lam
clam at code.gnucash.org
Mon Sep 9 11:25:53 EDT 2024
Updated via https://github.com/Gnucash/gnucash/commit/f6bca451 (commit)
via https://github.com/Gnucash/gnucash/commit/829cf340 (commit)
from https://github.com/Gnucash/gnucash/commit/85225b69 (commit)
commit f6bca451ef0d34aee2ec3f4bc0a676660f507cb2
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Sep 9 23:24:20 2024 +0800
[gnc-tree-model-price.c] bugfix adding a price causes segfault
Bug in a99491d034 -- ns_list was prematurely freed.
diff --git a/gnucash/gnome-utils/gnc-tree-model-price.c b/gnucash/gnome-utils/gnc-tree-model-price.c
index 7f882abcd5..729533111a 100644
--- a/gnucash/gnome-utils/gnc-tree-model-price.c
+++ b/gnucash/gnome-utils/gnc-tree-model-price.c
@@ -600,7 +600,6 @@ gnc_tree_model_price_get_path (GtkTreeModel *tree_model,
return path;
}
- g_list_free (ns_list);
/* Create a path to the price. */
commodity = gnc_price_get_commodity((GNCPrice*)iter->user_data2);
name_space = gnc_commodity_get_namespace_ds(commodity);
@@ -611,6 +610,7 @@ gnc_tree_model_price_get_path (GtkTreeModel *tree_model,
gtk_tree_path_append_index (path, GPOINTER_TO_INT(iter->user_data3));
debug_path(LEAVE, path);
g_list_free (cm_list);
+ g_list_free (ns_list);
return path;
}
commit 829cf34074c2015226217a9b95d30f5d51005341
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Sep 9 23:24:04 2024 +0800
[report-utilities.scm] use xaccAccountGetSplitSize
diff --git a/gnucash/report/report-utilities.scm b/gnucash/report/report-utilities.scm
index aadd1c7dbb..3b52bc90c0 100644
--- a/gnucash/report/report-utilities.scm
+++ b/gnucash/report/report-utilities.scm
@@ -666,7 +666,7 @@
;; function to count the total number of splits to be iterated
(define (gnc:accounts-count-splits accounts)
- (fold (lambda (a b) (+ b (length (xaccAccountGetSplitList a)))) 0 accounts))
+ (fold (lambda (a b) (+ b (xaccAccountGetSplitsSize a))) 0 accounts))
;; Sums up any splits of a certain type affecting a set of accounts.
;; the type is an alist '((str "match me") (cased #f) (regexp #f))
Summary of changes:
gnucash/gnome-utils/gnc-tree-model-price.c | 2 +-
gnucash/report/report-utilities.scm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
More information about the gnucash-changes
mailing list