adium 5218:8edfe2a5e3aa: Fix a crash with the IRC account menu w...

commits at adium.im commits at adium.im
Fri Nov 2 16:59:53 UTC 2012


details:	http://hg.adium.im/adium/rev/8edfe2a5e3aa
revision:	5218:8edfe2a5e3aa
branch:		adium-1.6
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Fri Nov 02 17:59:41 2012 +0100

Fix a crash with the IRC account menu when a non-group chat is active.

diffs (27 lines):

diff -r 40608a21c9f7 -r 8edfe2a5e3aa Plugins/Purple Service/ESIRCAccount.h
--- a/Plugins/Purple Service/ESIRCAccount.h	Wed Oct 31 12:14:32 2012 +0100
+++ b/Plugins/Purple Service/ESIRCAccount.h	Fri Nov 02 17:59:41 2012 +0100
@@ -40,6 +40,6 @@
 @property (readonly, nonatomic) NSString *defaultRealname;
 
 - (void)identifyForName:(NSString *)name password:(NSString *)inPassword;
-- (AIGroupChatFlags)flagsInChat:(AIChat *)chat;
+- (AIGroupChatFlags)flagsInChat:(AIGroupChat *)chat;
 
 @end
diff -r 40608a21c9f7 -r 8edfe2a5e3aa Plugins/Purple Service/ESIRCAccount.m
--- a/Plugins/Purple Service/ESIRCAccount.m	Wed Oct 31 12:14:32 2012 +0100
+++ b/Plugins/Purple Service/ESIRCAccount.m	Fri Nov 02 17:59:41 2012 +0100
@@ -560,8 +560,10 @@
 	AIOperationRequirement req = (AIOperationRequirement)menuItem.tag;
 	AIChat *chat = adium.interfaceController.activeChat;
 	BOOL anySelected = chat.chatContainer.messageViewController.selectedListObjects.count > 0;
-		
-	AIGroupChatFlags flags = [self flagsInChat:chat];
+	
+	if (!chat.isGroupChat) return YES;
+	
+	AIGroupChatFlags flags = [self flagsInChat:(AIGroupChat *)chat];
 	
 	switch (req) {
 		case AIRequiresHalfop:




More information about the commits mailing list