summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2011-06-22 17:08:34 (GMT)
committerOlivier CrĂȘte <olivier.crete@collabora.com>2011-06-22 17:08:34 (GMT)
commita5ac56734ea685fa3c1e7eb2c2ee51b15f60035f (patch)
tree10faddec1bb7fda592c554fadd0a713c9ba476a1
parent10e9f6b63f60366bc1383a90fbf0e09a62372df5 (diff)
downloadtelepathy-farsight-a5ac56734ea685fa3c1e7eb2c2ee51b15f60035f.tar.gz
telepathy-farsight-a5ac56734ea685fa3c1e7eb2c2ee51b15f60035f.tar.xz
Don't crash if named telephony event is sent before connecting
-rw-r--r--telepathy-farsight/stream.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/telepathy-farsight/stream.c b/telepathy-farsight/stream.c
index 7082fc9..ae4d153 100644
--- a/telepathy-farsight/stream.c
+++ b/telepathy-farsight/stream.c
@@ -2122,6 +2122,8 @@ start_named_telephony_event (TpMediaStreamHandler *proxy,
"codecs", &codecs,
NULL);
+ if (send_codec == NULL)
+ goto out;
if (check_codecs_for_telephone_event (self, &codecs, send_codec, codecid))
{
@@ -2152,6 +2154,8 @@ start_named_telephony_event (TpMediaStreamHandler *proxy,
g_queue_push_tail (&self->priv->events_to_send, dtmfevent);
}
+out:
+
fs_codec_destroy (send_codec);
fs_codec_list_destroy (codecs);
}