comparison src/protocols/jabber/jabber.c @ 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 338147ea6896
children 0473a28ce807
comparison
equal deleted inserted replaced
6501:b80ccf6391e3 6502:d5c1ae46d909
1019 /* 1019 /*
1020 * Return pointer to jabber_buddy_data if buddy found. Create if necessary. 1020 * Return pointer to jabber_buddy_data if buddy found. Create if necessary.
1021 */ 1021 */
1022 static struct jabber_buddy_data* jabber_find_buddy(GaimConnection *gc, const char *buddy, gboolean create) 1022 static struct jabber_buddy_data* jabber_find_buddy(GaimConnection *gc, const char *buddy, gboolean create)
1023 { 1023 {
1024 struct jabber_data *jd = gc->proto_data; 1024 struct jabber_data *jd;
1025 gpointer val; 1025 gpointer val;
1026 char *realwho; 1026 char *realwho;
1027 1027
1028 if (gc == NULL)
1029 return NULL;
1030
1031 jd = gc->proto_data;
1028 if((realwho = get_realwho(jd->gjc, buddy, FALSE, NULL)) == NULL) 1032 if((realwho = get_realwho(jd->gjc, buddy, FALSE, NULL)) == NULL)
1029 return NULL; 1033 return NULL;
1030 1034
1031 val = g_hash_table_lookup(jd->buddies, realwho); 1035 val = g_hash_table_lookup(jd->buddies, realwho);
1032 if(val) { 1036 if(val) {