changeset 8347:5d039bc19350

[gaim-migrate @ 9071] fix a potential segfault committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 26 Feb 2004 17:40:37 +0000
parents 0d980682678f
children 9f11f793c19e
files src/protocols/jabber/roster.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/roster.c	Thu Feb 26 17:29:14 2004 +0000
+++ b/src/protocols/jabber/roster.c	Thu Feb 26 17:40:37 2004 +0000
@@ -157,7 +157,11 @@
 		name = xmlnode_get_attrib(item, "name");
 		ask = xmlnode_get_attrib(item, "ask");
 
-		jb = jabber_buddy_find(js, jid, TRUE);
+		if(!jid)
+			continue;
+
+		if(!(jb = jabber_buddy_find(js, jid, TRUE)))
+			continue;
 
 		if(!subscription)
 			jb->subscription = JABBER_SUB_NONE;