[grilo] core: Allow NULL param in grl_date_time_from_iso_8601()



commit 0897b071313d3ca5970c042718508a00922e432a
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Sat Jul 6 10:36:16 2013 +0000

    core: Allow NULL param in grl_date_time_from_iso_8601()

 src/grl-util.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/grl-util.c b/src/grl-util.c
index 94935d2..1580b51 100644
--- a/src/grl-util.c
+++ b/src/grl-util.c
@@ -139,6 +139,10 @@ grl_date_time_from_iso8601 (const gchar *date)
   gchar *date_time;
   gint date_length;
 
+  if (!date) {
+    return NULL;
+  }
+
   ret = g_time_val_from_iso8601 (date, &t);
 
   /* second condition works around



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