From 957635e51af78a244fbd0d709ef1da07e8cc2bdf Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Fri, 11 May 2001 21:24:19 +0000 Subject: [PATCH] 2001-05-11 Dave Peticolas * src/gnome/new-user-callbacks.c: fix compiler warning * src/engine/gnc-book.c (gnc_book_set_group): fix bug git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4166 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 4 ++++ src/engine/gnc-book.c | 5 ++++- src/gnome/new-user-callbacks.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c6cdbf4248..6e08d6f3b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2001-05-11 Dave Peticolas + * src/gnome/new-user-callbacks.c: fix compiler warning + + * src/engine/gnc-book.c (gnc_book_set_group): fix bug + * src/engine/sql/Makefile.am: add files for make dist 2001-05-11 Bill Gribble diff --git a/src/engine/gnc-book.c b/src/engine/gnc-book.c index 1f981fabbe..8a3b495263 100644 --- a/src/engine/gnc-book.c +++ b/src/engine/gnc-book.c @@ -198,7 +198,10 @@ void gnc_book_set_group (GNCBook *book, AccountGroup *grp) { if(!book) return; - if(book->topgroup) xaccFreeAccountGroup(book->topgroup); + + /* Do not free the old topgroup here unless you also fix + * all the other uses of gnc_book_set_group! */ + book->topgroup = grp; } diff --git a/src/gnome/new-user-callbacks.c b/src/gnome/new-user-callbacks.c index a1423fd1e8..9593396f1a 100644 --- a/src/gnome/new-user-callbacks.c +++ b/src/gnome/new-user-callbacks.c @@ -404,7 +404,7 @@ add_to_ctree_final_account(Account* toadd, gpointer data) return NULL; } -void +static void gnc_new_user_insert_final_accounts(GtkCTree *tree, AccountGroup *group) { FinalInsertData data;