AUDIT: r21422 - gnucash/trunk/src/engine - Bug #626970 - Crash when saving a transaction whose destination account

Geert Janssens gjanssens at code.gnucash.org
Sat Oct 15 08:04:38 EDT 2011


Author: gjanssens
Date: 2011-10-15 08:04:38 -0400 (Sat, 15 Oct 2011)
New Revision: 21422
Trac: http://svn.gnucash.org/trac/changeset/21422

Modified:
   gnucash/trunk/src/engine/Split.c
Log:
Bug #626970 - Crash when saving a transaction whose destination account
was deleted in the meantime
BP

Modified: gnucash/trunk/src/engine/Split.c
===================================================================
--- gnucash/trunk/src/engine/Split.c	2011-10-14 17:45:45 UTC (rev 21421)
+++ gnucash/trunk/src/engine/Split.c	2011-10-15 12:04:38 UTC (rev 21422)
@@ -729,6 +729,10 @@
 
     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)))



More information about the gnucash-changes mailing list