From 48f80fe6342b14913ffbebf5449895ff9d5e9af8 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Thu, 18 Mar 2010 01:29:17 +0000 Subject: - Fix a couple of calls which crashed if the window had already been closed, fixing window close on query startup or after queries; this fixes http://log.sequelpro.com/view/9 - Fix an exception caused in the NavigatorController if the dbstructure has not been fetched yet --- Source/SPNavigatorController.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Source/SPNavigatorController.m') diff --git a/Source/SPNavigatorController.m b/Source/SPNavigatorController.m index ec3458ad..107019af 100644 --- a/Source/SPNavigatorController.m +++ b/Source/SPNavigatorController.m @@ -90,8 +90,10 @@ static SPNavigatorController *sharedNavigatorController = nil; if ([[[NSDocumentController sharedDocumentController] documents] count]) { for(id doc in [[NSDocumentController sharedDocumentController] documents]) { NSString *connectionName = [NSString stringWithFormat:@"%@@%@", [doc user], [doc host]]; - if(![schemaData objectForKey:connectionName]) - [schemaData setObject:[[doc valueForKeyPath:@"mySQLConnection"] getDbStructure] forKey:connectionName]; + if(![schemaData objectForKey:connectionName]) { + NSDictionary *dbStructure = [[doc valueForKeyPath:@"mySQLConnection"] getDbStructure]; + if (dbStructure) [schemaData setObject:dbStructure forKey:connectionName]; + } } } -- cgit v1.2.3