adium 4505:c0dcb2b73496: Don't crash when the log index failed t...

commits at adium.im commits at adium.im
Fri Jan 13 19:58:01 UTC 2012


details:	http://hg.adium.im/adium/rev/c0dcb2b73496
revision:	4505:c0dcb2b73496
branch:		(none)
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Fri Jan 13 20:53:50 2012 +0100

Don't crash when the log index failed to initialize when trying to delete a log, just bail.

Fixes #15771, refs #13586

diffs (15 lines):

diff -r 1690862014c7 -r c0dcb2b73496 Source/AILoggerPlugin.m
--- a/Source/AILoggerPlugin.m	Fri Jan 13 13:40:13 2012 +0200
+++ b/Source/AILoggerPlugin.m	Fri Jan 13 20:53:50 2012 +0100
@@ -517,6 +517,11 @@
 	dispatch_group_async(loggerPluginGroup, defaultDispatchQueue, blockWithAutoreleasePool(^{
 		SKIndexRef logSearchIndex = [bself logContentIndex];
 		
+        if (!logSearchIndex) {
+            AILogWithSignature(@"AILoggerPlugin warning: logSearchIndex is NULL, but we wanted to remove documents.");
+            return;
+        }
+
 		for (NSString *logPath in paths) {
 			SKDocumentRef document = SKDocumentCreateWithURL((CFURLRef)[NSURL fileURLWithPath:logPath]);
 			if (document) {




More information about the commits mailing list