Mercurial > pidgin
changeset 23833:ee028c73d3e2
Fix crash when receiving a session-initiate ack for a nonexistent session.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Sat, 07 Jun 2008 20:16:06 +0000 |
parents | bdc09d3164df |
children | cd3bb7a73925 |
files | libpurple/protocols/jabber/jingle.c |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle.c Sat Jun 07 19:57:32 2008 +0000 +++ b/libpurple/protocols/jabber/jingle.c Sat Jun 07 20:16:06 2008 +0000 @@ -992,9 +992,18 @@ { const char *from = xmlnode_get_attrib(packet, "from"); JingleSession *session = jabber_jingle_session_find_by_jid(js, from); - PurpleMedia *media = session->media; + PurpleMedia *media; GList *contents; + if (!session) { + /* respond with an error here */ + purple_debug_error("jingle", "Received session-initiate ack" + " to nonexistent session\n"); + return; + } + + media = session->media; + if (!strcmp(xmlnode_get_attrib(packet, "type"), "error")) { purple_media_got_hangup(media); return;