From 26675cbe2b899dc1aa6613f8345097eca1d92a94 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Thu, 9 Jul 2009 00:15:44 +0000 Subject: - Commit the second part of r995 (oops), addressing database selection issues --- Source/SPConnectionController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/SPConnectionController.m') diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index b5c53aba..2c5da3c7 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -324,7 +324,7 @@ return; } } - if (![[self database] isEqualToString:@""]) { + if ([self database] && ![[self database] isEqualToString:@""]) { if (![mySQLConnection selectDB:[self database]]) { [self failConnectionWithTitle:NSLocalizedString(@"Could not select database", @"message when database selection failed") errorMessage:[NSString stringWithFormat:NSLocalizedString(@"Connected to host, but unable to connect to database %@.\n\nBe sure that the database exists and that you have the necessary privileges.\n\nMySQL said: %@", @"message of panel when connection to db failed"), [self database], [mySQLConnection getLastErrorMessage]] detail:nil]; if (sshTunnel) [sshTunnel release], sshTunnel = nil; -- cgit v1.2.3