changeset 9911:4f1fcf5efaf9

[gaim-migrate @ 10803] " find_sub_by_id can return NULL if a subscription is not found; in the case of a zlocate, a subscription can go away during the async lookup, and boom." --Derrick (shadow) J Brashear (21:41:39) LSchiere: aatharuv: also https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1018786&group_id=235 (21:42:57) aatharuv: LSchiere: That patch is fine. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 30 Aug 2004 01:41:24 +0000
parents 0cb20555b3ab
children f6a1054e2bdc
files src/protocols/zephyr/zephyr.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/zephyr/zephyr.c	Mon Aug 30 01:40:07 2004 +0000
+++ b/src/protocols/zephyr/zephyr.c	Mon Aug 30 01:41:24 2004 +0000
@@ -2345,6 +2345,9 @@
 	char *sender = (char *)zephyr->username;
 
 	zt = find_sub_by_id(gc->proto_data,id);
+        /* find_sub_by_id can return NULL */
+        if (!zt) 
+                return;
 	gconv = gaim_find_conversation_with_account(zt->name, gc->account);
 	gcc = gaim_conversation_get_chat_data(gconv);