changeset 1909:8b915b0f681b

[gaim-migrate @ 1919] one last segfault committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 29 May 2001 01:39:05 +0000
parents 038aeba90fd6
children 1cfc79c126fe
files plugins/jabber/jabber.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/jabber/jabber.c	Mon May 28 22:21:12 2001 +0000
+++ b/plugins/jabber/jabber.c	Tue May 29 01:39:05 2001 +0000
@@ -130,6 +130,7 @@
 	jid Jid;
 	struct gaim_connection *gc;
 	struct conversation *b;
+	int id;
 };
 
 static char *jabber_name()
@@ -665,6 +666,7 @@
 			if ((jc = find_pending_chat(GJ_GC(j), p->from)) != NULL) {
 				/* yes, we're supposed to be. so now we are. */
 				jc->b = serv_got_joined_chat(GJ_GC(j), i++, p->from->user);
+				jc->id = jc->b->id;
 				jd->existing_chats = g_slist_append(jd->existing_chats, jc);
 				jd->pending_chats = g_slist_remove(jd->pending_chats, jc);
 			} else {
@@ -805,7 +807,7 @@
 				}
 
 				jd->existing_chats = g_slist_remove(jd->existing_chats, jc);
-				serv_got_chat_left(GJ_GC(j), jc->b->id);
+				serv_got_chat_left(GJ_GC(j), jc->id);
 				g_free(jc);
 			} else {
 				if ((!jc && !(jc = find_existing_chat(GJ_GC(j), who))) || !jc->b) {