[PATCH] tracker: ensure parsing all rdf types before fallback to GrlMedia creation



From: Lionel Landwerlin <lionel g landwerlin linux intel com>

Signed-off-by: Lionel Landwerlin <lionel g landwerlin linux intel com>
---
 src/media/tracker/grl-tracker-utils.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/media/tracker/grl-tracker-utils.c b/src/media/tracker/grl-tracker-utils.c
index fee63c8..40ca7ab 100644
--- a/src/media/tracker/grl-tracker-utils.c
+++ b/src/media/tracker/grl-tracker-utils.c
@@ -538,14 +538,15 @@ grl_tracker_build_grilo_media (const gchar *rdf_type)
       media = grl_media_box_new ();
     } else if (g_str_has_suffix (rdf_single_type[i], RDF_TYPE_FOLDER)) {
       media = grl_media_box_new ();
-    } else {
-      media = grl_media_new ();
     }
     i--;
   }
 
   g_strfreev (rdf_single_type);
 
+  if (!media)
+    media = grl_media_new ();
+
   return media;
 }
 
-- 
1.7.5.4



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