[tracker] Check error on dbus connection



commit 37fdf2d87170a8045f86532c01d43f3e6bcaedbe
Author: Ivan Frade <ivan frade nokia com>
Date:   Mon May 11 15:32:38 2009 +0300

    Check error on dbus connection
    
    Check the GError returned by the DBus connect method, and not only
    if connection != NULL.
    
    Fixes NB#115956, Tracker tools core dumps
---
 src/libtracker/tracker.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/libtracker/tracker.c b/src/libtracker/tracker.c
index b9750bf..c484249 100644
--- a/src/libtracker/tracker.c
+++ b/src/libtracker/tracker.c
@@ -151,7 +151,7 @@ tracker_connect (gboolean enable_warnings)
 
 	connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
 
-	if (connection == NULL)	{
+	if (connection == NULL || error != NULL) {
 		if (enable_warnings) {
 			g_warning("Unable to connect to dbus: %s\n", error->message);
 		}



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