mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix bugs, mem leaks.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3529 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
3b05398c60
commit
9d6c83e66d
@ -104,7 +104,7 @@ xaccInitAccount (Account * acc)
|
|||||||
|
|
||||||
xaccGUIDNew(&acc->guid);
|
xaccGUIDNew(&acc->guid);
|
||||||
xaccStoreEntity(acc, &acc->guid, GNC_ID_ACCOUNT);
|
xaccStoreEntity(acc, &acc->guid, GNC_ID_ACCOUNT);
|
||||||
LEAVE ("guid=%s\n", guid_to_string(&acc->guid));
|
LEAVE ("account=%p\n", acc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************\
|
/********************************************************************\
|
||||||
@ -375,7 +375,7 @@ xaccAccountSetGUID (Account *account, GUID *guid)
|
|||||||
{
|
{
|
||||||
if (!account || !guid) return;
|
if (!account || !guid) return;
|
||||||
|
|
||||||
PINFO("acct=%p guid=%s", account, guid_to_string(guid));
|
PINFO("acct=%p", account);
|
||||||
xaccRemoveEntity(&account->guid);
|
xaccRemoveEntity(&account->guid);
|
||||||
|
|
||||||
account->guid = *guid;
|
account->guid = *guid;
|
||||||
|
@ -208,8 +208,7 @@ xaccSplitScrub (Split *split)
|
|||||||
scu, GNC_RND_ROUND))
|
scu, GNC_RND_ROUND))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PINFO ("split with mismatched values: %s",
|
PINFO ("split with mismatched values");
|
||||||
guid_to_string (xaccSplitGetGUID (split)));
|
|
||||||
|
|
||||||
trans_was_open = xaccTransIsOpen (trans);
|
trans_was_open = xaccTransIsOpen (trans);
|
||||||
|
|
||||||
@ -312,8 +311,7 @@ xaccTransScrubImbalance (Transaction *trans, AccountGroup *root,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PINFO ("unbalanced transaction: %s",
|
PINFO ("unbalanced transaction");
|
||||||
guid_to_string (xaccTransGetGUID (trans)));
|
|
||||||
|
|
||||||
{
|
{
|
||||||
const gnc_commodity *common_currency;
|
const gnc_commodity *common_currency;
|
||||||
@ -364,6 +362,8 @@ xaccTransScrubImbalance (Transaction *trans, AccountGroup *root,
|
|||||||
if (balance_split)
|
if (balance_split)
|
||||||
xaccTransAppendSplit (trans, balance_split);
|
xaccTransAppendSplit (trans, balance_split);
|
||||||
|
|
||||||
|
xaccSplitScrub (balance_split);
|
||||||
|
|
||||||
if (!trans_was_open)
|
if (!trans_was_open)
|
||||||
xaccTransCommitEdit (trans);
|
xaccTransCommitEdit (trans);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user