aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPNavigatorController.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-03-18 01:29:17 +0000
committerrowanbeentje <rowan@beent.je>2010-03-18 01:29:17 +0000
commit48f80fe6342b14913ffbebf5449895ff9d5e9af8 (patch)
tree5b98ec4570c28cc209a4ec701cb9e1aded7ac9d3 /Source/SPNavigatorController.m
parenta8dc3ac2af642fb59c8fbed12c3a28038ef3a175 (diff)
downloadsequelpro-48f80fe6342b14913ffbebf5449895ff9d5e9af8.tar.gz
sequelpro-48f80fe6342b14913ffbebf5449895ff9d5e9af8.tar.bz2
sequelpro-48f80fe6342b14913ffbebf5449895ff9d5e9af8.zip
- 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
Diffstat (limited to 'Source/SPNavigatorController.m')
-rw-r--r--Source/SPNavigatorController.m6
1 files changed, 4 insertions, 2 deletions
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];
+ }
}
}