From eee2ef43a2ee380e184561cdc69d619fcedbf46e Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Sat, 20 May 2000 12:18:29 +0000 Subject: [PATCH] Fix bug in dialog add. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2367 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome/dialog-add.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gnome/dialog-add.c b/src/gnome/dialog-add.c index 75ef0a3622..5a56ebbf7a 100644 --- a/src/gnome/dialog-add.c +++ b/src/gnome/dialog-add.c @@ -107,7 +107,7 @@ gnc_ui_accWindow_list_select_cb(GtkCList * type_list, gint row, gint column, /********************************************************************\ - * Function: gnc_ui_accWindow_list_unselect_cb - a callback for the* + * Function: gnc_ui_accWindow_list_unselect_cb - a callback for the * * list of account types window * * * * Args: type_list - the list widget * @@ -530,6 +530,11 @@ accWindow (AccountGroup *this_is_not_used) break; } + g_free(accData); + + if (result < 0) + return NULL; + DEBUG("destroying account add window\n"); gdk_window_get_geometry(dialog->window, NULL, NULL, @@ -538,7 +543,6 @@ accWindow (AccountGroup *this_is_not_used) gnc_save_window_size("account_add_win", last_width, last_height); gtk_widget_destroy(dialog); - g_free(accData); return NULL; }