mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
Bug #661220 - Critical errors when closing down Gnucash
Patch by Robert Fewell git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21417 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
+10
-3
@@ -325,7 +325,8 @@ struct _iterate
|
||||
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 @@ qof_collection_foreach (const QofCollection *col, QofInstanceForeachCB cb_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct _iterate iter;
|
||||
GList *entries;
|
||||
|
||||
g_return_if_fail (col);
|
||||
g_return_if_fail (cb_func);
|
||||
@@ -345,7 +347,12 @@ qof_collection_foreach (const QofCollection *col, QofInstanceForeachCB cb_func,
|
||||
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));
|
||||
}
|
||||
/* =============================================================== */
|
||||
|
||||
Reference in New Issue
Block a user