From a76fa5631c9b0abb8bdbe3d132ebe155b87d0a77 Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Tue, 13 Jul 2021 15:12:12 +0100 Subject: [PATCH] Free schedule Transaction accounts There is no need to act differently when destroying the scheduled transactions accounts, they can be destroyed when the scheduled transaction is freed under normal conditions and on book close. --- libgnucash/engine/SchedXaction.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/libgnucash/engine/SchedXaction.c b/libgnucash/engine/SchedXaction.c index ebbc1c48dd..51edb4e227 100644 --- a/libgnucash/engine/SchedXaction.c +++ b/libgnucash/engine/SchedXaction.c @@ -497,17 +497,8 @@ xaccSchedXactionFree( SchedXaction *sx ) delete_template_trans( sx ); - /* - * xaccAccountDestroy removes the account from - * its group for us AFAICT. If shutting down, - * the account is being deleted separately. - */ - - if (!qof_book_shutting_down(qof_instance_get_book(sx))) - { - xaccAccountBeginEdit(sx->template_acct); - xaccAccountDestroy(sx->template_acct); - } + xaccAccountBeginEdit( sx->template_acct ); + xaccAccountDestroy( sx->template_acct ); for ( l = sx->deferredList; l; l = l->next ) {