From 04e2bfabc93ed2014e04928277f931dc01436442 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Fri, 23 Apr 2010 19:44:52 +0000 Subject: Perform bounds checking in the process list controller's table view data source method. Fixes exception http://spbug.com/l/146. --- Source/SPProcessListController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPProcessListController.m b/Source/SPProcessListController.m index 06cd9881..131b78d3 100644 --- a/Source/SPProcessListController.m +++ b/Source/SPProcessListController.m @@ -407,8 +407,8 @@ */ - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { - id object = [[processesFiltered objectAtIndex:row] valueForKey:[tableColumn identifier]]; - + id object = (row < [processesFiltered count]) ? [[processesFiltered objectAtIndex:row] valueForKey:[tableColumn identifier]] : @""; + return (![object isNSNull]) ? object : [prefs stringForKey:SPNullValue]; } -- cgit v1.2.3