changeset 6502:d5c1ae46d909

[gaim-migrate @ 7017] Fixes a crash on exit when a jabber conversation window is open at the time. (Checks for gc == NULL in jabber_find_buddy) committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Tue, 19 Aug 2003 05:31:12 +0000
parents b80ccf6391e3
children e690a3bc8480
files src/protocols/jabber/jabber.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c	Tue Aug 19 05:24:19 2003 +0000
+++ b/src/protocols/jabber/jabber.c	Tue Aug 19 05:31:12 2003 +0000
@@ -1021,10 +1021,14 @@
  */
 static struct jabber_buddy_data* jabber_find_buddy(GaimConnection *gc, const char *buddy, gboolean create)
 {
-	struct jabber_data *jd = gc->proto_data;
+	struct jabber_data *jd;
 	gpointer val;
 	char *realwho;
 
+	if (gc == NULL)
+		return NULL;
+
+	jd = gc->proto_data;
 	if((realwho = get_realwho(jd->gjc, buddy, FALSE, NULL)) == NULL)
 		return NULL;