minor cleanup

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@781 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-04-05 08:34:46 +00:00
parent cec5cb3918
commit 5003b58622

View File

@ -56,12 +56,11 @@ LedgerDestroy (BasicRegister *reg)
/* be sure to destroy the "blank split" */
if (reg->user_hook) {
Split *split;
Account * acc;
split = (Split *) (reg->user_hook);
acc = xaccSplitGetAccount (split);
xaccAccountRemoveSplit (acc, split);
/* split destroy will automatically remove it
* from its parent account */
xaccSplitDestroy (split);
reg->user_hook = NULL;
}