Commits

Anonymous committed d625c06

Access 'account' through the accessor, which will lazily create as necessary, to ensure proper behavior. There's no guarantee the PurpleaAccount has already been initialized.
(transplanted from 78f14fe416d99e97c4c382d71caeeb3d3d1e8044)

Comments (0)

Files changed (1)

Plugins/Purple Service/CBPurpleAccount.m

 {
 	PurplePlugin				*prpl;
 	
-	if ((prpl = purple_find_prpl(purple_account_get_protocol_id(account)))) {
+	if ((prpl = purple_find_prpl(purple_account_get_protocol_id(self.purpleAccount)))) {
 		return PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
 	}
 	
  */
 - (NSAlert*)alertForAccountDeletion
 {
-	PurplePluginProtocolInfo *prpl_info = self.protocolInfo;
+	PurplePluginProtocolInfo *prpl_info;
 
 	//Ensure libpurple has been loaded, since we need to know whether we can unregister this account
 	[self purpleAdapter];
 
+	prpl_info = self.protocolInfo;
+	
 	if (prpl_info && 
 		prpl_info->unregister_user &&
 		[self allowAccountUnregistrationIfSupportedByLibpurple]) {