[grilo-plugins] tracker: fix crash with non per device mode
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] tracker: fix crash with non per device mode
- Date: Thu, 17 Mar 2011 20:38:03 +0000 (UTC)
commit 6163f8540b924e5ccba813cca6fff0d8881bdd9d
Author: Lionel Landwerlin <lionel g landwerlin linux intel com>
Date: Wed Mar 16 15:48:16 2011 +0000
tracker: fix crash with non per device mode
Datasource wasn't set.
Signed-off-by: Lionel Landwerlin <lionel g landwerlin linux intel com>
src/media/tracker/grl-tracker-media.c | 1 +
src/media/tracker/grl-tracker-utils.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/media/tracker/grl-tracker-media.c b/src/media/tracker/grl-tracker-media.c
index 03b222a..e5ccfff 100644
--- a/src/media/tracker/grl-tracker-media.c
+++ b/src/media/tracker/grl-tracker-media.c
@@ -85,6 +85,7 @@ grl_tracker_media_new (TrackerSparqlConnection *connection)
"source-name", GRL_TRACKER_MEDIA_NAME,
"source-desc", GRL_TRACKER_MEDIA_DESC,
"tracker-connection", connection,
+ "tracker-datasource", "",
NULL);
}
diff --git a/src/media/tracker/grl-tracker-utils.c b/src/media/tracker/grl-tracker-utils.c
index aacbb66..9f520cb 100644
--- a/src/media/tracker/grl-tracker-utils.c
+++ b/src/media/tracker/grl-tracker-utils.c
@@ -172,7 +172,8 @@ grl_tracker_key_is_supported (const GrlKeyID key)
gchar *
grl_tracker_media_get_device_constraint (GrlTrackerMediaPriv *priv)
{
- if (priv->tracker_datasource == NULL)
+ if (priv->tracker_datasource == NULL ||
+ priv->tracker_datasource[0] == '\0')
return g_strdup ("");
return g_strdup_printf ("?urn nie:dataSource <%s> .",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]