nautilus r13955 - in trunk: . libnautilus-private



Author: sdroege
Date: Wed Mar 19 14:23:28 2008
New Revision: 13955
URL: http://svn.gnome.org/viewvc/nautilus?rev=13955&view=rev

Log:
* 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.


Modified:
   trunk/ChangeLog
   trunk/libnautilus-private/nautilus-search-engine-tracker.c

Modified: trunk/libnautilus-private/nautilus-search-engine-tracker.c
==============================================================================
--- trunk/libnautilus-private/nautilus-search-engine-tracker.c	(original)
+++ trunk/libnautilus-private/nautilus-search-engine-tracker.c	Wed Mar 19 14:23:28 2008
@@ -258,6 +258,7 @@
 {
 	NautilusSearchEngineTracker *engine;
 	TrackerClient *tracker_client;
+	GError *err = NULL;
 
 	tracker_client =  tracker_connect (FALSE);
 
@@ -265,6 +266,14 @@
 		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;



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