[grilo-plugins] apple-trailers: Fix warning when date isn't supplied



commit 80907dc83ffea5a9015246a3f01bb405effc50a3
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jul 5 15:54:22 2013 +0200

    apple-trailers: Fix warning when date isn't supplied
    
    The date isn't supplied for some films.

 src/apple-trailers/grl-apple-trailers.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/apple-trailers/grl-apple-trailers.c b/src/apple-trailers/grl-apple-trailers.c
index af131fa..0233609 100644
--- a/src/apple-trailers/grl-apple-trailers.c
+++ b/src/apple-trailers/grl-apple-trailers.c
@@ -357,7 +357,10 @@ build_media_from_movie (xmlNodePtr node, gboolean xlarge)
 
   grl_media_set_id (media, movie_id);
   grl_media_set_author (media, movie_author);
-  date = grl_date_time_from_iso8601 (movie_date);
+  if (movie_date)
+    date = grl_date_time_from_iso8601 (movie_date);
+  else
+    date = NULL;
   if (date) {
     grl_media_set_publication_date (media, date);
     g_date_time_unref (date);


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