pidgin: 382a6e23: Don't crash trying to modify the setting...

nosnilmot at pidgin.im nosnilmot at pidgin.im
Wed Aug 5 21:11:13 EDT 2009


-----------------------------------------------------------------
Revision: 382a6e23439358833e86ea840c31fe5e780498bc
Ancestor: 3b6dec6dc5f2cd96c7e41e65f23002486061449f
Author: nosnilmot at pidgin.im
Date: 2009-08-06T01:05:11
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/382a6e23439358833e86ea840c31fe5e780498bc

Modified files:
        finch/gntaccount.c

ChangeLog: 

Don't crash trying to modify the settings for an account where the prpl is
no longer available

-------------- next part --------------
============================================================
--- finch/gntaccount.c	6fa675c02791d73ce1286d7982b3f38f5e457ba0
+++ finch/gntaccount.c	919d910889de567485855ac894b906b0d8632e7f
@@ -489,6 +489,7 @@ edit_account(PurpleAccount *account)
 	GntWidget *combo, *button, *entry;
 	GList *list, *iter;
 	AccountEditDialog *dialog;
+	PurplePlugin *plugin;
 
 	if (account)
 	{
@@ -532,9 +533,10 @@ edit_account(PurpleAccount *account)
 				((PurplePlugin*)iter->data)->info->name);
 	}
 
-	if (account)
-		gnt_combo_box_set_selected(GNT_COMBO_BOX(combo),
-				purple_plugins_find_with_id(purple_account_get_protocol_id(account)));
+	plugin = purple_plugins_find_with_id(purple_account_get_protocol_id(account));
+
+	if (account && plugin)
+		gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), plugin);
 	else
 		gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), list->data);
 


More information about the Commits mailing list