[gnome-documents] utils: don't call g_time_val_from_iso8601 with a NULL string



commit 81802d32eb12964f471ba6a5ca8576423de8526a
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon May 14 14:32:34 2012 -0400

    utils: don't call g_time_val_from_iso8601 with a NULL string

 src/lib/gd-utils.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/lib/gd-utils.c b/src/lib/gd-utils.c
index fab24de..513cc9a 100644
--- a/src/lib/gd-utils.c
+++ b/src/lib/gd-utils.c
@@ -409,7 +409,10 @@ gd_time_val_from_iso8601 (const gchar *string,
                           GTimeVal *timeval)
 {
   if (string == NULL)
-    g_get_current_time (timeval);
+    {
+      g_get_current_time (timeval);
+      return TRUE;
+    }
 
   return g_time_val_from_iso8601 (string, timeval);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]