[grisbi-cvs] grisbi/src gsb_file_save.c,1.151,1.152

Pierre Biava pbiava at users.sourceforge.net
Sun Feb 21 00:03:12 CET 2010


Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv20210

Modified Files:
	gsb_file_save.c 
Log Message:
fixes a crash

Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -d -r1.151 -r1.152
--- gsb_file_save.c	20 Feb 2010 22:19:46 -0000	1.151
+++ gsb_file_save.c	20 Feb 2010 23:03:10 -0000	1.152
@@ -2629,7 +2629,10 @@
     etat.bet_hist_fyear );
 
     lignes = bet_data_get_strings_to_save ( );
-    new_string = g_strconcat ( new_string, lignes -> str, "\t\t/>\n", NULL );
+    if ( lignes && lignes -> str )
+        new_string = g_strconcat ( new_string, lignes -> str, "\t\t/>\n", NULL );
+    else
+        new_string = g_strconcat ( new_string, "\t\t/>\n", NULL );
 
     /* append the new string to the file content
      * and return the new iterator */



More information about the cvs mailing list