r21417 - gnucash/trunk/src/libqof/qof - Bug #661220 - Critical errors when closing down Gnucash
Geert Janssens
gjanssens at code.gnucash.org
Fri Oct 14 10:57:54 EDT 2011
Author: gjanssens
Date: 2011-10-14 10:57:54 -0400 (Fri, 14 Oct 2011)
New Revision: 21417
Trac: http://svn.gnucash.org/trac/changeset/21417
Modified:
gnucash/trunk/src/libqof/qof/qofid.c
Log:
Bug #661220 - Critical errors when closing down Gnucash
Patch by Robert Fewell
Modified: gnucash/trunk/src/libqof/qof/qofid.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofid.c 2011-10-12 08:02:15 UTC (rev 21416)
+++ gnucash/trunk/src/libqof/qof/qofid.c 2011-10-14 14:57:54 UTC (rev 21417)
@@ -325,7 +325,8 @@
gpointer data;
};
-static void foreach_cb (gpointer key, gpointer item, gpointer arg)
+static void
+foreach_cb (gpointer item, gpointer arg)
{
struct _iterate *iter = arg;
QofInstance *ent = item;
@@ -338,6 +339,7 @@
gpointer user_data)
{
struct _iterate iter;
+ GList *entries;
g_return_if_fail (col);
g_return_if_fail (cb_func);
@@ -345,7 +347,12 @@
iter.fcn = cb_func;
iter.data = user_data;
- g_hash_table_foreach (col->hash_of_entities, foreach_cb, &iter);
+ PINFO("Hash Table size of %s before is %d", col->e_type, g_hash_table_size(col->hash_of_entities));
+
+ entries = g_hash_table_get_values (col->hash_of_entities);
+ g_list_foreach (entries, foreach_cb, &iter);
+ g_list_free (entries);
+
+ PINFO("Hash Table size of %s after is %d", col->e_type, g_hash_table_size(col->hash_of_entities));
}
-
/* =============================================================== */
More information about the gnucash-changes
mailing list