mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug #626970 - Crash when saving a transaction whose destination account
was deleted in the meantime Improved fix BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21423 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
14c60deb29
commit
500882caf4
@ -721,17 +721,17 @@ static void commit_err (QofInstance *inst, QofBackendError errcode)
|
||||
void
|
||||
xaccSplitCommitEdit(Split *s)
|
||||
{
|
||||
Account *acc, *orig_acc;
|
||||
Account *acc = NULL;
|
||||
Account *orig_acc = NULL;
|
||||
|
||||
g_return_if_fail(s);
|
||||
if (!qof_instance_is_dirty(QOF_INSTANCE(s)))
|
||||
return;
|
||||
|
||||
orig_acc = s->orig_acc;
|
||||
acc = s->acc;
|
||||
|
||||
if (!GNC_IS_ACCOUNT(acc))
|
||||
return;
|
||||
if (GNC_IS_ACCOUNT(s->acc))
|
||||
acc=s->acc;
|
||||
|
||||
/* Remove from lot (but only if it hasn't been moved to
|
||||
new lot already) */
|
||||
|
Loading…
Reference in New Issue
Block a user