adium 4036:6c903329d574: Fix an occasional crash in -[AILoggerPl...

commits at adium.im commits at adium.im
Wed Jun 29 02:50:42 UTC 2011


details:	http://hg.adium.im/adium/rev/6c903329d574
revision:	4036:6c903329d574
branch:		(none)
author:		Stephen Holt <sholt at adium.im>
date:		Tue Jun 28 19:50:34 2011 -0700

Fix an occasional crash in -[AILoggerPlugin contentObjectAdded:] by sending it to the main queue. Easier than ensuring -[AIChat countByEnumeratingWithState:objects:count:] is thread safe for now.

Revisit once I (or someone else) has done that.

diffs (12 lines):

diff -r d3520e9b49f4 -r 6c903329d574 Source/AILoggerPlugin.m
--- a/Source/AILoggerPlugin.m	Tue Jun 28 11:20:38 2011 -0500
+++ b/Source/AILoggerPlugin.m	Tue Jun 28 19:50:34 2011 -0700
@@ -1017,7 +1017,7 @@
 		if (![chat shouldLog]) return;	
 		
 		__block __typeof__(self) bself = self;
-		dispatch_group_async(logAppendingGroup, defaultDispatchQueue, blockWithAutoreleasePool(^{
+		dispatch_group_async(logAppendingGroup, dispatch_get_main_queue(), blockWithAutoreleasePool(^{
 			BOOL			dirty = NO;
 			NSString		*contentType = [content type];
 			NSString		*date = [[[content date] dateWithCalendarFormat:nil timeZone:nil] ISO8601DateString];




More information about the commits mailing list