aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-08-11 16:37:09 +0000
committerrowanbeentje <rowan@beent.je>2009-08-11 16:37:09 +0000
commitee585cfa63ae19c0a2ad946ba3c618391dc20c52 (patch)
tree86b64af27ff650fca70bf95ed666d6be4ba36364 /Source/TableDocument.m
parent76563cf13092e21da3efd853c0721f782bbc0b83 (diff)
downloadsequelpro-release-0.9.6.tar.gz
sequelpro-release-0.9.6.tar.bz2
sequelpro-release-0.9.6.zip
- Fix a crasher for blank passwordsrelease-0.9.6
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 526ddae0..d5c0d16f 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -2096,7 +2096,9 @@
* Invoked when the current connection needs a password from the Keychain.
*/
- (NSString *)keychainPasswordForConnection:(MCPConnection *)connection
-{
+{
+ if (![connectionController connectionKeychainItemName]) return @"";
+
KeyChain *keychain = [[KeyChain alloc] init];
NSString *password = [keychain getPasswordForName:[connectionController connectionKeychainItemName] account:[connectionController connectionKeychainItemAccount]];