From dc7cd06f2b1d8f59a2368b89b92b31402dbca2fd Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Thu, 14 Dec 2000 01:40:44 +0000 Subject: [PATCH] Fix rollback bug --- set copied split account to NULL before inserting. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3305 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/engine/Transaction.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine/Transaction.c b/src/engine/Transaction.c index 9e1f25d1c2..6e722ad6cc 100644 --- a/src/engine/Transaction.c +++ b/src/engine/Transaction.c @@ -1541,10 +1541,12 @@ xaccTransRollbackEdit (Transaction *trans) node ; node = node->next) { Split *s = node->data; + Account *account = s->acc; + s->acc = NULL; xaccStoreEntity(s, &s->guid, GNC_ID_SPLIT); - xaccAccountInsertSplit (s->acc, s); - xaccAccountRecomputeBalance (s->acc); + xaccAccountInsertSplit (account, s); + xaccAccountRecomputeBalance (account); mark_split (s); } }