adium 4685:963f93d5e2c6: Look up contacts on the main thread, to...
commits at adium.im
commits at adium.im
Sat Feb 11 00:16:52 UTC 2012
details: http://hg.adium.im/adium/rev/963f93d5e2c6
revision: 4685:963f93d5e2c6
branch: (none)
author: Thijs Alkemade <thijsalkemade at gmail.com>
date: Sat Feb 11 01:15:45 2012 +0100
Look up contacts on the main thread, to avoid exceptions about mutating a mutable dictionary that is being enumerated.
This should fix some of the transcripts showing up as corrupt errors.
diffs (16 lines):
diff -r e30c939bb5dc -r 963f93d5e2c6 Source/AIXMLChatlogConverter.m
--- a/Source/AIXMLChatlogConverter.m Sat Feb 11 00:51:32 2012 +0100
+++ b/Source/AIXMLChatlogConverter.m Sat Feb 11 01:15:45 2012 +0100
@@ -229,7 +229,11 @@
//Find an account if one exists, and use its name
displayName = (myDisplayName ? myDisplayName : sender);
} else {
- AIListObject *listObject = [adium.contactController existingListObjectWithUniqueID:[AIListObject internalObjectIDForServiceID:service UID:sender]];
+ __block AIListObject *listObject;
+
+ dispatch_sync(dispatch_get_main_queue(), ^{
+ listObject = [adium.contactController existingListObjectWithUniqueID:[AIListObject internalObjectIDForServiceID:service UID:sender]];
+ });
displayName = listObject.displayName;
longDisplayName = [listObject longDisplayName];
More information about the commits
mailing list