Bug #626970 - Crash when saving a transaction whose destination account

was deleted in the meantime
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21422 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2011-10-15 12:04:38 +00:00
parent 7bc5e89950
commit 14c60deb29

View File

@ -729,6 +729,10 @@ xaccSplitCommitEdit(Split *s)
orig_acc = s->orig_acc;
acc = s->acc;
if (!GNC_IS_ACCOUNT(acc))
return;
/* Remove from lot (but only if it hasn't been moved to
new lot already) */
if (s->lot && (gnc_lot_get_account(s->lot) != acc || qof_instance_get_destroying(s)))