changeset 15161:bface7451bd1

[gaim-migrate @ 17947] If a message is being received in a group chat at a moment just after it has been left, gaim_conv_chat_incoming_msg() is still triggerred but find_oscar_chat_by_conn() returns NULL. We no longer crash in this situation. committer: Tailor Script <tailor@pidgin.im>
author Evan Schoenberg <evan.s@dreskin.net>
date Sun, 10 Dec 2006 14:45:27 +0000
parents c6b79e535eb8
children 96f3a7286375
files libgaim/protocols/oscar/oscar.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libgaim/protocols/oscar/oscar.c	Sun Dec 10 11:26:17 2006 +0000
+++ b/libgaim/protocols/oscar/oscar.c	Sun Dec 10 14:45:27 2006 +0000
@@ -3078,6 +3078,9 @@
 	GaimConnection *gc = od->gc;
 	struct chat_connection *ccon = find_oscar_chat_by_conn(gc, conn);
 
+	if (!ccon)
+		return 1;
+
 	va_start(ap, fr);
 	roominfo = va_arg(ap, struct aim_chat_roominfo *);
 	roomname = va_arg(ap, char *);
@@ -3112,6 +3115,9 @@
 	char *msg;
 	char *charset;
 
+	if (!ccon)
+		return 1;
+
 	va_start(ap, fr);
 	info = va_arg(ap, aim_userinfo_t *);
 	len = va_arg(ap, int);