From 297cff347a38223afaca2765a8f05f40c54b0bd3 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Sat, 31 Jan 2009 19:49:49 +0000 Subject: [PATCH] Bug #569628: Fix failed assertion 'str' when saving Whenever I saved my Gnucash file I would get a number of errors like CRIT 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 --- src/backend/file/gnc-recurrence-xml-v2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/file/gnc-recurrence-xml-v2.c b/src/backend/file/gnc-recurrence-xml-v2.c index dce602d2a1..ba3cdb805b 100644 --- a/src/backend/file/gnc-recurrence-xml-v2.c +++ b/src/backend/file/gnc-recurrence-xml-v2.c @@ -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");