aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPProcessListController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-04-23 19:44:52 +0000
committerstuconnolly <stuart02@gmail.com>2010-04-23 19:44:52 +0000
commit04e2bfabc93ed2014e04928277f931dc01436442 (patch)
tree1905b9c6041f118cbdf2e3368030a60abaa79ba4 /Source/SPProcessListController.m
parentb0195c5305a4fc3db4ffaa113ce4d246bd4dec66 (diff)
downloadsequelpro-04e2bfabc93ed2014e04928277f931dc01436442.tar.gz
sequelpro-04e2bfabc93ed2014e04928277f931dc01436442.tar.bz2
sequelpro-04e2bfabc93ed2014e04928277f931dc01436442.zip
Perform bounds checking in the process list controller's table view data source method. Fixes exception http://spbug.com/l/146.
Diffstat (limited to 'Source/SPProcessListController.m')
-rw-r--r--Source/SPProcessListController.m4
1 files changed, 2 insertions, 2 deletions
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];
}