summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-02-23 12:58:51 (GMT)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-02-23 12:58:51 (GMT)
commitac978e5e11a94ce25458605bb16ca4d218686c5a (patch)
tree39de62ef58cef9f4b043ac26449c944c673a7fe2
parentae46a3af2aab0b3234fd221c937dcd758f5f2846 (diff)
downloadtelepathy-yell-ac978e5e11a94ce25458605bb16ca4d218686c5a.tar.gz
telepathy-yell-ac978e5e11a94ce25458605bb16ca4d218686c5a.tar.xz
Don't try to copy null boxed types
-rw-r--r--telepathy-yell/call-channel.c18
-rw-r--r--telepathy-yell/call-stream.c6
2 files changed, 16 insertions, 8 deletions
diff --git a/telepathy-yell/call-channel.c b/telepathy-yell/call-channel.c
index ba88f96..968f0d5 100644
--- a/telepathy-yell/call-channel.c
+++ b/telepathy-yell/call-channel.c
@@ -223,6 +223,7 @@ on_call_channel_get_all_properties_cb (TpProxy *proxy,
GObject *weak_object)
{
TpyCallChannel *self = TPY_CALL_CHANNEL (proxy);
+ GHashTable *hash_table;
GPtrArray *contents;
guint i;
@@ -236,17 +237,22 @@ on_call_channel_get_all_properties_cb (TpProxy *proxy,
"CallState", NULL);
self->priv->flags = tp_asv_get_uint32 (properties,
"CallFlags", NULL);
- self->priv->details = g_boxed_copy (G_TYPE_HASH_TABLE,
- tp_asv_get_boxed (properties, "CallStateDetails", G_TYPE_HASH_TABLE));
self->priv->initial_audio = tp_asv_get_boolean (properties,
"InitialAudio", NULL);
self->priv->initial_video = tp_asv_get_boolean (properties,
"InitialVideo", NULL);
- self->priv->members = g_boxed_copy (G_TYPE_HASH_TABLE,
- tp_asv_get_boxed (properties, "CallMembers", G_TYPE_HASH_TABLE));
- contents = g_boxed_copy (G_TYPE_PTR_ARRAY,
- tp_asv_get_boxed (properties, "Contents", G_TYPE_PTR_ARRAY));
+ hash_table = tp_asv_get_boxed (properties,
+ "CallStateDetails", G_TYPE_HASH_TABLE);
+ if (hash_table != NULL)
+ self->priv->details = g_boxed_copy (G_TYPE_HASH_TABLE, hash_table);
+
+ hash_table = tp_asv_get_boxed (properties,
+ "CallMembers", G_TYPE_HASH_TABLE);
+ if (hash_table != NULL)
+ self->priv->members = g_boxed_copy (G_TYPE_HASH_TABLE, hash_table);
+
+ contents = tp_asv_get_boxed (properties, "Contents", G_TYPE_PTR_ARRAY);
for (i = 0; i < contents->len; i++)
{
diff --git a/telepathy-yell/call-stream.c b/telepathy-yell/call-stream.c
index d5dda5d..2ddd3a0 100644
--- a/telepathy-yell/call-stream.c
+++ b/telepathy-yell/call-stream.c
@@ -55,6 +55,7 @@ on_call_stream_get_all_properties_cb (TpProxy *proxy,
GObject *weak_object)
{
TpyCallStream *self = TPY_CALL_STREAM (proxy);
+ GHashTable *members;
if (error != NULL)
{
@@ -68,8 +69,9 @@ on_call_stream_get_all_properties_cb (TpProxy *proxy,
"CanRequestReceiving", NULL);
tp_clear_pointer (&self->priv->remote_members, g_hash_table_unref);
- self->priv->remote_members = g_boxed_copy (G_TYPE_HASH_TABLE,
- tp_asv_get_boxed (properties, "RemoteMembers", G_TYPE_HASH_TABLE));
+ members = tp_asv_get_boxed (properties, "RemoteMembers", G_TYPE_HASH_TABLE);
+ if (members != NULL)
+ self->priv->remote_members = g_boxed_copy (G_TYPE_HASH_TABLE, members);
}
static void