mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
Register: Add additional debugging output during register cleanup. Also rename a variable for clarity and to match typical usage in the rest of the ledger code.
BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17840 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -2485,7 +2485,7 @@ gnc_split_register_cleanup (SplitRegister *reg)
|
||||
{
|
||||
SRInfo *info = gnc_split_register_get_info (reg);
|
||||
Transaction *pending_trans;
|
||||
Transaction *trans = NULL;
|
||||
Transaction *blank_trans = NULL;
|
||||
Split *blank_split;
|
||||
|
||||
ENTER("reg=%p", reg);
|
||||
@@ -2503,16 +2503,19 @@ gnc_split_register_cleanup (SplitRegister *reg)
|
||||
{
|
||||
/* split destroy will automatically remove it
|
||||
* from its parent account */
|
||||
trans = xaccSplitGetParent (blank_split);
|
||||
blank_trans = xaccSplitGetParent (blank_split);
|
||||
|
||||
DEBUG("blank_split=%p, blank_trans=%p, pending_trans=%p",
|
||||
blank_split, blank_trans, pending_trans);
|
||||
|
||||
/* Make sure we don't commit this below */
|
||||
if (trans == pending_trans)
|
||||
if (blank_trans == pending_trans)
|
||||
{
|
||||
info->pending_trans_guid = *guid_null ();
|
||||
pending_trans = NULL;
|
||||
}
|
||||
|
||||
xaccTransDestroy (trans);
|
||||
xaccTransDestroy (blank_trans);
|
||||
|
||||
info->blank_split_guid = *guid_null ();
|
||||
blank_split = NULL;
|
||||
@@ -2521,8 +2524,8 @@ gnc_split_register_cleanup (SplitRegister *reg)
|
||||
/* be sure to take care of any open transactions */
|
||||
if (pending_trans != NULL)
|
||||
{
|
||||
g_critical("BUG DETECTED: pending_trans=%p, blank_split=%p, trans=%p",
|
||||
pending_trans, blank_split, trans);
|
||||
g_critical("BUG DETECTED: pending_trans=%p, blank_split=%p, blank_trans=%p",
|
||||
pending_trans, blank_split, blank_trans);
|
||||
g_assert_not_reached();
|
||||
info->pending_trans_guid = *guid_null ();
|
||||
/* CAS: It's not clear to me that we'd really want to commit
|
||||
|
||||
Reference in New Issue
Block a user