provide some memory management for the commodity table in the book

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8525 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 2003-06-10 03:36:48 +00:00
parent 9b9fef58ce
commit ddbb6b44a2

View File

@ -527,8 +527,12 @@ printf ("duude get commodity table\n");
void
gnc_commodity_table_set_table(GNCBook *book, gnc_commodity_table *ct)
{
gnc_commodity_table *old_ct;
if (!book) return;
old_ct = gnc_commodity_table_get_table (book);
gnc_book_set_data (book, GNC_COMMODITY_TABLE, ct);
gnc_commodity_table_destroy (old_ct);
}
/********************************************************************