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:
Geert Janssens 2011-10-16 21:01:28 +00:00
parent 14c60deb29
commit 500882caf4

View File

@ -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) */