[tracker/libtracker-bus: 28/52] libtracker-bus: Fix critical when cancellable is NULL
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-bus: 28/52] libtracker-bus: Fix critical when cancellable is NULL
- Date: Fri, 13 Aug 2010 08:24:36 +0000 (UTC)
commit 933451bc3d5b85747110c6aeca969be7be22f904
Author: Jürg Billeter <j bitron ch>
Date: Thu Jul 22 12:15:54 2010 +0200
libtracker-bus: Fix critical when cancellable is NULL
src/libtracker-bus/tracker-bus-fd-update.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-bus/tracker-bus-fd-update.c b/src/libtracker-bus/tracker-bus-fd-update.c
index d90c652..47c348d 100644
--- a/src/libtracker-bus/tracker-bus-fd-update.c
+++ b/src/libtracker-bus/tracker-bus-fd-update.c
@@ -101,10 +101,12 @@ fast_async_data_new (DBusConnection *connection,
data->connection = dbus_connection_ref (connection);
data->operation_type = operation_type;
- data->cancellable = g_object_ref (cancellable);
- data->user_data = user_data;
+ if (cancellable) {
+ data->cancellable = g_object_ref (cancellable);
- data->cancelid = g_cancellable_connect (cancellable, G_CALLBACK (on_cancel), data, NULL);
+ data->cancelid = g_cancellable_connect (cancellable, G_CALLBACK (on_cancel), data, NULL);
+ }
+ data->user_data = user_data;
return data;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]