diff options
Diffstat (limited to 'Source/CMTextView.m')
-rw-r--r-- | Source/CMTextView.m | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m index a4bcda58..2b9879b6 100644 --- a/Source/CMTextView.m +++ b/Source/CMTextView.m @@ -314,13 +314,8 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) if(dbs != nil && [dbs isKindOfClass:[NSDictionary class]] && [dbs count]) { NSMutableArray *allDbs = [NSMutableArray array]; - [allDbs addObjectsFromArray:[dbs allKeys]]; - - // Add database names having no tables since they don't appear in the information_schema - if ([[[[self window] delegate] valueForKeyPath:@"tablesListInstance"] valueForKey:@"allDatabaseNames"] != nil) - for(id db in [[[[self window] delegate] valueForKeyPath:@"tablesListInstance"] valueForKey:@"allDatabaseNames"]) - if(![allDbs containsObject:[NSString stringWithFormat:@"%@%@%@", connectionID, SPUniqueSchemaDelimiter, db]]) - [allDbs addObject:[NSString stringWithFormat:@"%@%@%@", connectionID, SPUniqueSchemaDelimiter, db]]; + @try { [allDbs addObjectsFromArray:[dbs allKeys]]; } + @catch(id ae) { ; } NSSortDescriptor *desc = [[NSSortDescriptor alloc] initWithKey:nil ascending:YES selector:@selector(localizedCompare:)]; NSMutableArray *sortedDbs = [NSMutableArray array]; |