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

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17865 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2009-01-31 19:49:49 +00:00
parent efc19c85eb
commit 297cff347a

View File

@ -113,6 +113,8 @@ dom_tree_to_recurrence(xmlNodePtr node)
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");