[Gnucash-changes] r13869 - gnucash/trunk/src/engine - Remove an assertion w/ explanation of why it doesn't hold. Fixes #339781.

Chris Shoemaker chris at cvs.gnucash.org
Thu Apr 27 17:02:31 EDT 2006


Author: chris
Date: 2006-04-27 17:02:30 -0400 (Thu, 27 Apr 2006)
New Revision: 13869
Trac: http://svn.gnucash.org/trac/changeset/13869

Modified:
   gnucash/trunk/src/engine/Account.c
Log:
   Remove an assertion w/ explanation of why it doesn't hold.  Fixes #339781.


Modified: gnucash/trunk/src/engine/Account.c
===================================================================
--- gnucash/trunk/src/engine/Account.c	2006-04-27 21:00:09 UTC (rev 13868)
+++ gnucash/trunk/src/engine/Account.c	2006-04-27 21:02:30 UTC (rev 13869)
@@ -360,8 +360,15 @@
       Split *s = lp->data;
       xaccSplitDestroy (s);
     }
-    g_assert(acc->splits == NULL || qof_book_shutting_down(acc->inst.book));
-    g_list_free(slist);
+    /* It turns out there's a case where this assertion does not hold:
+       When the user tries to delete an Imbalance account, while also
+       deleting all the splits in it.  The splits will just get
+       recreated and put right back into the same account!
+
+       g_assert(acc->splits == NULL || qof_book_shutting_down(acc->inst.book));
+    */
+
+    g_list_free(slist); 
     /* the lots should be empty by now */
     for (lp=acc->lots; lp; lp=lp->next)
     {



More information about the gnucash-changes mailing list