Mercurial > pidgin
changeset 23815:1f085713c281
Fix crash bug when checking if a contact can do media when logging out.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Mon, 02 Jun 2008 18:18:58 +0000 |
parents | d0ac3c438b71 |
children | e73b03097664 |
files | libpurple/protocols/jabber/jabber.c |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c Sat May 31 20:15:34 2008 +0000 +++ b/libpurple/protocols/jabber/jabber.c Mon Jun 02 18:18:58 2008 +0000 @@ -2646,8 +2646,15 @@ PurpleMediaStreamType type) { JabberStream *js = (JabberStream *) gc->proto_data; - JabberBuddy *jb = jabber_buddy_find(js, who, FALSE); - + JabberBuddy *jb; + + if (!js) { + purple_debug_error("jabber", "jabber_can_do_media: NULL stream\n"); + return FALSE; + } + + jb = jabber_buddy_find(js, who, FALSE); + if (!jb) { purple_debug_error("jabber", "Could not find buddy\n"); return FALSE;