[grilo-plugins] tracker: fix null pointer usage
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] tracker: fix null pointer usage
- Date: Tue, 8 Mar 2011 08:40:05 +0000 (UTC)
commit 17c94e0d9b3cf93957e91394fde1c8d41f7e8f2c
Author: Lionel Landwerlin <lionel g landwerlin linux intel com>
Date: Mon Feb 21 15:11:03 2011 +0000
tracker: fix null pointer usage
Only spotted in case of tracker-control -k -r && tracker-control -s
Signed-off-by: Lionel Landwerlin <lionel g landwerlin linux intel com>
src/media/tracker/grl-tracker-notif.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/media/tracker/grl-tracker-notif.c b/src/media/tracker/grl-tracker-notif.c
index f14d0bc..df70d10 100644
--- a/src/media/tracker/grl-tracker-notif.c
+++ b/src/media/tracker/grl-tracker-notif.c
@@ -180,7 +180,7 @@ tracker_evt_update_orphan_item_cb (GObject *object,
{
guint id;
const gchar *type, *datasource;
- GrlTrackerSource *source;
+ GrlTrackerSource *source = NULL;
GError *error = NULL;
GRL_DEBUG ("%s: evt=%p", __FUNCTION__, evt);
@@ -208,7 +208,8 @@ tracker_evt_update_orphan_item_cb (GObject *object,
GRL_DEBUG ("\tOrphan item: id=%u datasource=%s", id, datasource);
- source = grl_tracker_source_find (datasource);
+ if (datasource)
+ source = grl_tracker_source_find (datasource);
if (source && GRL_IS_TRACKER_SOURCE (source)) {
GrlMedia *media;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]