AUDIT: r17865 - gnucash/trunk/src/backend/file - Bug #569628: Fix failed assertion 'str' when saving

Christian Stimming cstim at cvs.gnucash.org
Sat Jan 31 14:49:49 EST 2009


Author: cstim
Date: 2009-01-31 14:49:49 -0500 (Sat, 31 Jan 2009)
New Revision: 17865
Trac: http://svn.gnucash.org/trac/changeset/17865

Modified:
   gnucash/trunk/src/backend/file/gnc-recurrence-xml-v2.c
Log:
Bug #569628: Fix failed assertion 'str' when saving

Whenever I saved my Gnucash file I would get a number of errors like

  CRIT <gnc.backend.xml> text_to_dom_tree: assertion `str' failed

I tracked this down to the fact that the weekend adjust field in recurrences
read from the file was not initialized properly if a recurrence didn't have a
weekend adjustment.

Patch by Mike Alexander.
BP

Modified: gnucash/trunk/src/backend/file/gnc-recurrence-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/file/gnc-recurrence-xml-v2.c	2009-01-31 10:46:19 UTC (rev 17864)
+++ gnucash/trunk/src/backend/file/gnc-recurrence-xml-v2.c	2009-01-31 19:49:49 UTC (rev 17865)
@@ -113,6 +113,8 @@
     Recurrence *r;
 
     r = g_new(Recurrence, 1);
+    /* In case the file doesn't have a weekend adjustment element */
+    r->wadj = WEEKEND_ADJ_NONE;
     successful = dom_tree_generic_parse (node, recurrence_dom_handlers, r);
     if (!successful) {
         PERR ("failed to parse recurrence node");



More information about the gnucash-changes mailing list