From 62e8c9b6dfb4f50c7a1525b9d51c5b30f2658245 Mon Sep 17 00:00:00 2001 From: Chris Shoemaker Date: Wed, 11 Oct 2006 00:39:44 +0000 Subject: [PATCH] Ensure that the blank transaction is marked as the pending transaction when it is modified. This fixes a bug where editing the blank transaction, moving off of the transaction line to a split line, leaving the split line unedited and then closing the register will incorrectly leave the transaction open without asking. The bug fixed by this commit is possibly responsible for some of the crashes like bug #348469. BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15002 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/register/ledger-core/split-register.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/register/ledger-core/split-register.c b/src/register/ledger-core/split-register.c index 57cb93fecf..80a70cce40 100644 --- a/src/register/ledger-core/split-register.c +++ b/src/register/ledger-core/split-register.c @@ -1381,8 +1381,11 @@ gnc_split_register_save (SplitRegister *reg, gboolean do_commit) g_assert_not_reached(); if (trans == blank_trans) { - /* Don't begin editing the blank trans, because it's already open */ + /* Don't begin editing the blank trans, because it's + already open, but mark it pending now. */ g_assert(xaccTransIsOpen(blank_trans)); + /* This is now the pending transaction */ + info->pending_trans_guid = *xaccTransGetGUID(blank_trans); } else { PINFO("beginning edit of trans %p", trans); if (gnc_split_register_begin_edit_or_warn(info, trans))