changeset 26609:9a2e4aebfa91

Fix purple_buddy_destroy crash on exit.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Fri, 10 Apr 2009 01:18:15 +0000
parents 082a97307b8d
children bd61f91e669a
files libpurple/blist.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/blist.c	Thu Apr 09 23:18:13 2009 +0000
+++ b/libpurple/blist.c	Fri Apr 10 01:18:15 2009 +0000
@@ -1249,9 +1249,11 @@
 	 * can free proto_data
 	 */
 	prpl = purple_find_prpl(purple_account_get_protocol_id(buddy->account));
-	prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
-	if (prpl_info && prpl_info->buddy_free)
-		prpl_info->buddy_free(buddy);
+	if (prpl) {
+		prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
+		if (prpl_info && prpl_info->buddy_free)
+			prpl_info->buddy_free(buddy);
+	}
 
 	/* Delete the node */
 	purple_buddy_icon_unref(buddy->icon);