diff options
author | rowanbeentje <rowan@beent.je> | 2009-12-14 01:23:29 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-12-14 01:23:29 +0000 |
commit | 5247ac10ff8d1fe91756c60dfd05605e8bc3d884 (patch) | |
tree | 5aa40a57a722c2b38d9759ff772530960d3d3d98 /Source/SPTableData.m | |
parent | 5298595375e55bb70edae0ddf17d921a299b1014 (diff) | |
download | sequelpro-5247ac10ff8d1fe91756c60dfd05605e8bc3d884.tar.gz sequelpro-5247ac10ff8d1fe91756c60dfd05605e8bc3d884.tar.bz2 sequelpro-5247ac10ff8d1fe91756c60dfd05605e8bc3d884.zip |
- Work through static analysis of the source, fixing a number of small memory leaks and fixing a couple of over-releases
Diffstat (limited to 'Source/SPTableData.m')
-rw-r--r-- | Source/SPTableData.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPTableData.m b/Source/SPTableData.m index 6f7c6702..fb777b9d 100644 --- a/Source/SPTableData.m +++ b/Source/SPTableData.m @@ -809,6 +809,8 @@ */ - (NSDictionary *) parseFieldDefinitionStringParts:(NSArray *)definitionParts { + if (![definitionParts count]) return [NSDictionary dictionary]; + SPSQLParser *detailParser; SPSQLParser *fieldParser = [[SPSQLParser alloc] init]; NSMutableDictionary *fieldDetails = [[NSMutableDictionary alloc] init]; @@ -816,8 +818,6 @@ NSString *detailString; int i, definitionPartsIndex = 0, partsArrayLength; - if (![definitionParts count]) return [NSDictionary dictionary]; - // Skip blank items within the definition parts while (definitionPartsIndex < [definitionParts count] && ![[[definitionParts objectAtIndex:definitionPartsIndex] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length]) |