diff options
author | Sebastian Dröge <sdroege@src.gnome.org> | 2008-03-19 14:23:28 +0000 |
---|---|---|
committer | Sebastian Dröge <sdroege@src.gnome.org> | 2008-03-19 14:23:28 +0000 |
commit | afbd7f9cb66a9619fbb6c675081b81bf0668b9f3 (patch) | |
tree | ff96e6aec9ed6df06bef6610ef2b25037e0a1bf5 /libnautilus-private/nautilus-search-engine-tracker.c | |
parent | d1689f29250e782fa03d183f5b00c73a52e81d0c (diff) | |
download | nautilus-afbd7f9cb66a9619fbb6c675081b81bf0668b9f3.tar.gz |
Check that tracker is actually running before using it (#386512). Patch by
* libnautilus-private/nautilus-search-engine-tracker.c:
(nautilus_search_engine_tracker_new): Check that tracker is
actually running before using it (#386512).
Patch by Josselin Mouette.
svn path=/trunk/; revision=13955
Diffstat (limited to 'libnautilus-private/nautilus-search-engine-tracker.c')
-rw-r--r-- | libnautilus-private/nautilus-search-engine-tracker.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-search-engine-tracker.c b/libnautilus-private/nautilus-search-engine-tracker.c index c1ec553dd..327a37501 100644 --- a/libnautilus-private/nautilus-search-engine-tracker.c +++ b/libnautilus-private/nautilus-search-engine-tracker.c @@ -258,6 +258,7 @@ nautilus_search_engine_tracker_new (void) { NautilusSearchEngineTracker *engine; TrackerClient *tracker_client; + GError *err = NULL; tracker_client = tracker_connect (FALSE); @@ -265,6 +266,14 @@ nautilus_search_engine_tracker_new (void) return NULL; } + tracker_get_version (tracker_client, &err); + + if (err != NULL) { + g_error_free (err); + tracker_disconnect (tracker_client); + return NULL; + } + engine = g_object_new (NAUTILUS_TYPE_SEARCH_ENGINE_TRACKER, NULL); engine->details->client = tracker_client; |