[tracker] tracker-store: Fix a crash when client disappears



commit 02c09adcb14680d7305fc5958ceaa03de45b338e
Author: Philip Van Hoof <philip codeminded be>
Date:   Mon May 3 11:00:39 2010 +0200

    tracker-store: Fix a crash when client disappears

 src/tracker-store/tracker-resources.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-store/tracker-resources.c b/src/tracker-store/tracker-resources.c
index 2a74957..274fb29 100644
--- a/src/tracker-store/tracker-resources.c
+++ b/src/tracker-store/tracker-resources.c
@@ -214,15 +214,20 @@ query_callback (gpointer inthread_data, GError *error, gpointer user_data)
 	InThreadPtr *ptr = inthread_data;
 	TrackerDBusMethodInfo *info = user_data;
 
-	if (ptr->error) {
+	if (ptr && ptr->error) {
 		tracker_dbus_request_failed (info->request_id,
 		                             info->context,
 		                             &ptr->error,
 		                             NULL);
 		dbus_g_method_return_error (info->context, ptr->error);
 		g_error_free (ptr->error);
+	} else if (error) {
+		tracker_dbus_request_failed (info->request_id,
+		                             info->context,
+		                             &error,
+		                             NULL);
+		dbus_g_method_return_error (info->context, error);
 	} else {
-
 		tracker_dbus_request_success (info->request_id,
 		                              info->context);
 



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