adium 4854:b9d9c8a21067: ESContactAlertsController should abort ...

commits at adium.im commits at adium.im
Fri Jun 8 11:18:51 UTC 2012


details:	http://hg.adium.im/adium/rev/b9d9c8a21067
revision:	4854:b9d9c8a21067
branch:		adium-1.5.2
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Fri Jun 08 13:17:40 2012 +0200

ESContactAlertsController should abort its event when it can not find the contact that it should send the message to.

Fixes #15787

diffs (16 lines):

diff -r 8b73767eed26 -r b9d9c8a21067 Plugins/Send Message Contact Alert/ESSendMessageContactAlertPlugin.m
--- a/Plugins/Send Message Contact Alert/ESSendMessageContactAlertPlugin.m	Fri Jun 08 01:49:48 2012 +0200
+++ b/Plugins/Send Message Contact Alert/ESSendMessageContactAlertPlugin.m	Fri Jun 08 13:17:40 2012 +0200
@@ -106,6 +106,12 @@
 
 	destUniqueID = [details objectForKey:KEY_MESSAGE_SEND_TO];
 	if (destUniqueID) contact = (AIListContact *)[adium.contactController existingListObjectWithUniqueID:destUniqueID];
+	
+	/* I'm not sure how this can actually end up here, but apparently if the user has 2 or more accounts, one
+	 * with a pending message for a meta-contact on 2 accounts, and the other connects first, this event will
+	 * fire, but contact will be nil. (#15787).
+	 */
+	if (!contact) return FALSE;
 
 	//Message to send and other options
 	useAnotherAccount = [[details objectForKey:KEY_MESSAGE_OTHER_ACCOUNT] boolValue];




More information about the commits mailing list