[Gnucash-changes] 2004-05-08 Christian Stimming <stimming@tuhh.de> *

Christian Stimming cstim at cvs.gnucash.org
Sat May 8 05:31:03 EDT 2004


Log Message:
-----------
2004-05-08  Christian Stimming  <stimming at tuhh.de>

	* src/import-export/import-match-map.c
	(gnc_imap_add_account_bayes): Skip the case when a token is the
	empty string. This caused many warnings about a NULL kvp_frame
	lookup.

Tags:
----
gnucash-1-8-branch

Modified Files:
--------------
    gnucash:
        ChangeLog
    gnucash/src/import-export:
        import-match-map.c

Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1461.2.332
retrieving revision 1.1461.2.333
diff -LChangeLog -LChangeLog -u -r1.1461.2.332 -r1.1461.2.333
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,10 @@
+2004-05-08  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/import-match-map.c
+	(gnc_imap_add_account_bayes): Skip the case when a token is the
+	empty string. This caused many warnings about a NULL kvp_frame
+	lookup.
+
 2004-05-07  David Hampton  <hampton at employees.org>
 
 	* src/app-utils/gnc-ui-util.[ch]: Added quote sources for Indian
Index: import-match-map.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-match-map.c,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -Lsrc/import-export/import-match-map.c -Lsrc/import-export/import-match-map.c -u -r1.4.2.1 -r1.4.2.2
--- src/import-export/import-match-map.c
+++ src/import-export/import-match-map.c
@@ -476,6 +476,13 @@
   for(current_token = g_list_first(tokens); current_token;
       current_token = current_token->next)
     {
+      /* Jump to next iteration if the pointer is not valid or if the
+	 string is empty. In HBCI import we almost always get an empty
+	 string, which doesn't work in the kvp loopkup later. So we
+	 skip this case here. */
+      if (!current_token->data || (*((char*)current_token->data) == '\0'))
+	continue;
+
       /* start off with no tokens for this account */
       token_count = 0;
 


More information about the Gnucash-changes mailing list