diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c index 67496be5b..5f5fad0f1 100644 --- a/gio/gdbusconnection.c +++ b/gio/gdbusconnection.c @@ -222,7 +222,6 @@ typedef struct { GDestroyNotify callback; gpointer user_data; - GMainContext *context; } CallDestroyNotifyData; static gboolean @@ -236,8 +235,6 @@ call_destroy_notify_data_in_idle (gpointer user_data) static void call_destroy_notify_data_free (CallDestroyNotifyData *data) { - if (data->context != NULL) - g_main_context_unref (data->context); g_free (data); } @@ -263,9 +260,6 @@ call_destroy_notify (GMainContext *context, data = g_new0 (CallDestroyNotifyData, 1); data->callback = callback; data->user_data = user_data; - data->context = context; - if (data->context != NULL) - g_main_context_ref (data->context); idle_source = g_idle_source_new (); g_source_set_priority (idle_source, G_PRIORITY_DEFAULT); @@ -274,7 +268,7 @@ call_destroy_notify (GMainContext *context, data, (GDestroyNotify) call_destroy_notify_data_free); g_source_set_name (idle_source, "[gio] call_destroy_notify_data_in_idle"); - g_source_attach (idle_source, data->context); + g_source_attach (idle_source, context); g_source_unref (idle_source); out: