aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <gdesmott@gnome.org>2009-02-17 05:25:14 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2009-02-17 05:25:14 +0800
commit77f26518808f792d475310542a7e8f17c3f3b3e4 (patch)
tree2aae5f5bf123fc40a982a7f5797f7e0f7834e686
parent151305208b3057d09379efceebd94a702d970efb (diff)
downloadgsoc2013-empathy-77f26518808f792d475310542a7e8f17c3f3b3e4.tar
gsoc2013-empathy-77f26518808f792d475310542a7e8f17c3f3b3e4.tar.gz
gsoc2013-empathy-77f26518808f792d475310542a7e8f17c3f3b3e4.tar.bz2
gsoc2013-empathy-77f26518808f792d475310542a7e8f17c3f3b3e4.tar.lz
gsoc2013-empathy-77f26518808f792d475310542a7e8f17c3f3b3e4.tar.xz
gsoc2013-empathy-77f26518808f792d475310542a7e8f17c3f3b3e4.tar.zst
gsoc2013-empathy-77f26518808f792d475310542a7e8f17c3f3b3e4.zip
empathy-dispatcher: deal properly with NULL channel_wrapper
From: Guillaume Desmottes <gdesmott@gnome.org> git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@2487 4ee84921-47dd-4033-b63a-18d7a039a3e4
-rw-r--r--libempathy/empathy-dispatcher.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index 06dafa43c..ab00503c8 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);
}