Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv13192/src

Modified Files:
        display_sorttabs.c prefs.c 
Log Message:
         * src/display_sorttabs.c
           (sp_update_date_interval_from_string): fix compilation
           warning and possible segfault.



Index: display_sorttabs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/display_sorttabs.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- display_sorttabs.c  9 Jun 2006 00:42:22 -0000       1.77
+++ display_sorttabs.c  10 Jun 2006 05:04:03 -0000      1.78
@@ -1,4 +1,4 @@
-/* Time-stamp: <2005-11-25 23:52:13 jcs>
+/* Time-stamp: <2006-06-10 14:02:30 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -392,7 +392,7 @@
 
     if (ti)
     {
-      gchar *new_string; 
+      gchar *new_string=NULL; 
       switch (item)
       {
       case T_TIME_PLAYED:
@@ -406,16 +406,21 @@
           break;
       default:
           break;
-  }
+      }
 
-       if (force_update || !ti->int_str ||
-           (strcmp (new_string, ti->int_str) != 0))
-       {   /* Re-evaluate the interval */
-           g_free (ti->int_str);
-           ti->int_str = g_strdup (new_string);
-           dp2_parse (ti);
-       }
-    g_free(new_string);
+      if (!new_string)
+      {
+         new_string = g_strdup ("");
+      }
+
+      if (force_update || !ti->int_str ||
+         (strcmp (new_string, ti->int_str) != 0))
+      {   /* Re-evaluate the interval */
+         g_free (ti->int_str);
+         ti->int_str = g_strdup (new_string);
+         dp2_parse (ti);
+      }
+      g_free(new_string);
     }
     
     return ti;

Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.213
retrieving revision 1.214
diff -u -d -r1.213 -r1.214
--- prefs.c     10 Jun 2006 01:52:33 -0000      1.213
+++ prefs.c     10 Jun 2006 05:04:04 -0000      1.214
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-06-04 23:35:20 jcs>
+/* Time-stamp: <2006-06-10 12:12:25 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.



_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to