changeset 27423:d4cfd179203b

yahoo: Don't do anything in yahoo_status_text when disconnecting. prpl->status_text is called via a signed-off signal callback in gtkconv.c, at which point gc != NULL, but gc->proto_data == NULL. That was triggering an assertion in yahoo_friend_find.
author Paul Aurich <paul@darkrain42.org>
date Wed, 08 Jul 2009 17:02:07 +0000
parents d46ab8c52cc4
children 8368e4fb7d3a
files libpurple/protocols/yahoo/libymsg.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libymsg.c	Wed Jul 08 16:51:14 2009 +0000
+++ b/libpurple/protocols/yahoo/libymsg.c	Wed Jul 08 17:02:07 2009 +0000
@@ -3686,9 +3686,14 @@
 	const char *msg;
 	char *msg2;
 	PurpleAccount *account;
+	PurpleConnection *gc;
 
 	account = purple_buddy_get_account(b);
-	f = yahoo_friend_find(purple_account_get_connection(account), purple_buddy_get_name(b));
+	gc = purple_account_get_connection(account);
+	if (!gc || !purple_connection_get_protocol_data(gc))
+		return NULL;
+
+	f = yahoo_friend_find(gc, purple_buddy_get_name(b));
 	if (!f)
 		return g_strdup(_("Not on server list"));