AUDIT: r21423 - gnucash/trunk/src/engine - Bug #626970 - Crash when saving a transaction whose destination account
Geert Janssens
gjanssens at code.gnucash.org
Sun Oct 16 17:01:29 EDT 2011
Author: gjanssens
Date: 2011-10-16 17:01:28 -0400 (Sun, 16 Oct 2011)
New Revision: 21423
Trac: http://svn.gnucash.org/trac/changeset/21423
Modified:
gnucash/trunk/src/engine/Split.c
Log:
Bug #626970 - Crash when saving a transaction whose destination account
was deleted in the meantime
Improved fix
BP
Modified: gnucash/trunk/src/engine/Split.c
===================================================================
--- gnucash/trunk/src/engine/Split.c 2011-10-15 12:04:38 UTC (rev 21422)
+++ gnucash/trunk/src/engine/Split.c 2011-10-16 21:01:28 UTC (rev 21423)
@@ -721,17 +721,17 @@
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) */
More information about the gnucash-changes
mailing list