--- a/Source/AILogViewerWindowController.m Thu Sep 06 21:01:42 2012 +0200
+++ b/Source/AILogViewerWindowController.m Wed Sep 05 18:25:04 2012 -0500
@@ -497,7 +497,7 @@
//Rebuild the 'global' log indexes
[logFromGroupDict release]; logFromGroupDict = [[NSMutableDictionary alloc] init];
@@ -1927,16 +1927,27 @@
- (void)tableViewSelectionDidChangeDelayed
if (!ignoreSelectionChange) {
+ NSArray *selectedLogs = nil; //Update the displayed log
- selectedLogs = [tableView_results selectedItemsFromArray:currentSearchResults];
+ /* If currentSearchResults is out of sync with the data of tableView_results, this could throw an exception. + * Catching it is far more straightforward than preventing that possibility without breaking our re-selection of + * selected search results as the table view reloads when new results come in. + selectedLogs = [tableView_results selectedItemsFromArray:currentSearchResults]; + } @catch (NSException *e) { - [self displayLogs:selectedLogs];
+ [self displayLogs:selectedLogs];