From 7986241858867de3b4c66f0f67173c340734dcb4 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 16 Feb 2009 21:25:14 +0000 Subject: [PATCH] empathy-dispatcher: deal properly with NULL channel_wrapper From: Guillaume Desmottes svn path=/trunk/; revision=2487 --- libempathy/empathy-dispatcher.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 06dafa43..ab00503c 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -121,7 +121,8 @@ new_dispatch_data (TpChannel *channel, { DispatchData *d = g_slice_new0 (DispatchData); d->channel = g_object_ref (channel); - d->channel_wrapper = g_object_ref (channel_wrapper); + if (channel_wrapper != NULL) + d->channel_wrapper = g_object_ref (channel_wrapper); return d; } @@ -130,7 +131,8 @@ static void free_dispatch_data (DispatchData *data) { g_object_unref (data->channel); - g_object_unref (data->channel_wrapper); + if (data->channel_wrapper != NULL) + g_object_unref (data->channel_wrapper); g_slice_free (DispatchData, data); } -- 2.39.2