Anonymous avatar 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]) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.