From 9302e6ef30fa615a122b49a05cee61a8aa6369e0 Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Thu, 8 Jun 2000 02:23:24 +0000 Subject: [PATCH] Bug fixes. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2439 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/register/gnome/combocell-gnome.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/register/gnome/combocell-gnome.c b/src/register/gnome/combocell-gnome.c index 25caabea24..94940119d7 100644 --- a/src/register/gnome/combocell-gnome.c +++ b/src/register/gnome/combocell-gnome.c @@ -306,6 +306,14 @@ destroyCombo (BasicCell *bcell) /* =============================================== */ +static void +menustring_free(gpointer string, gpointer user_data) +{ + g_free(string); +} + +/* =============================================== */ + void xaccDestroyComboCell (ComboCell *cell) { PopBox *box = (PopBox *) cell->cell.gui_private; @@ -313,8 +321,9 @@ void xaccDestroyComboCell (ComboCell *cell) destroyCombo(&(cell->cell)); if (box != NULL) { - g_list_foreach(box->menustrings, (GFunc) g_free, NULL); + g_list_foreach(box->menustrings, menustring_free, NULL); g_list_free(box->menustrings); + box->menustrings = NULL; xaccFreeQuickFill(box->qf); box->qf = NULL; @@ -348,7 +357,7 @@ xaccClearComboCellMenu (ComboCell * cell) if (box->menustrings == NULL) return; - g_list_foreach(box->menustrings, (GFunc) g_free, NULL); + g_list_foreach(box->menustrings, menustring_free, NULL); g_list_free(box->menustrings); box->menustrings = NULL;