From 4cad6f0e6e4fb497b480256c2abe3de34ebf225c Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Mon, 16 Apr 2012 20:16:52 +0000 Subject: Bring outline view branch up to date with trunk. --- Source/SPTableStructureDelegate.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/SPTableStructureDelegate.m') diff --git a/Source/SPTableStructureDelegate.m b/Source/SPTableStructureDelegate.m index fdcf6b3b..6fc5e7b6 100644 --- a/Source/SPTableStructureDelegate.m +++ b/Source/SPTableStructureDelegate.m @@ -30,7 +30,7 @@ #import "SPTableData.h" #import "SPTableView.h" #import "SPTableFieldValidation.h" -#import "SPMySQL.h" +#import @implementation SPTableStructure (SPTableStructureDelegate) @@ -49,7 +49,7 @@ if([[tableColumn identifier] isEqualToString:@"collation"]) { NSInteger idx = 0; - if((idx = [[NSArrayObjectAtIndex(tableFields,rowIndex) objectForKey:@"encoding"] integerValue]) > 0) { + if((idx = [[NSArrayObjectAtIndex(tableFields,rowIndex) objectForKey:@"encoding"] integerValue]) > 0 && idx < [encodingPopupCell numberOfItems]) { NSString *enc = [[encodingPopupCell itemAtIndex:idx] title]; NSInteger start = [enc rangeOfString:@"("].location+1; NSInteger end = [enc length] - start - 1; -- cgit v1.2.3