Perhaps this initialization should be made in the Recurrence initializer? Otherwise we'd have to deal with this setting everywhere it gets created?
(Just an idea) -derek Christian Stimming <[email protected]> writes: > 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"); > > _______________________________________________ > gnucash-changes mailing list > [email protected] > https://lists.gnucash.org/mailman/listinfo/gnucash-changes > > -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH [email protected] PGP key available _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
