adium/adium

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

Fixes #15787
--- 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];