mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
9b9fef58ce
commit
ddbb6b44a2
@ -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);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user