diff options
author | rowanbeentje <rowan@beent.je> | 2010-03-23 00:23:11 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-03-23 00:23:11 +0000 |
commit | fa32739de8f7ea821ee83ec2e5c7f51f5eb3e0c0 (patch) | |
tree | a71a36b083370066cd70eae616ae561c4a60e26b /Frameworks/MCPKit/MCPFoundationKit | |
parent | 9892a96b80073686b0dd1205d4f859b10d32336f (diff) | |
download | sequelpro-fa32739de8f7ea821ee83ec2e5c7f51f5eb3e0c0.tar.gz sequelpro-fa32739de8f7ea821ee83ec2e5c7f51f5eb3e0c0.tar.bz2 sequelpro-fa32739de8f7ea821ee83ec2e5c7f51f5eb3e0c0.zip |
- Fix a crash when connecting to a non-existant database by cleaning up dealloc/unlock procedure. Addresses http://log.sequelpro.com/view/73
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit')
-rw-r--r-- | Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m index 7f5c4365..7c7de35f 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m @@ -2461,10 +2461,8 @@ void performThreadedKeepAlive(void *ptr) { delegate = nil; - // Release the query lock, after unlocking it - [queryLock tryLock]; - [queryLock unlock]; - [queryLock release]; + // Ensure the query lock is unlocked + [self unlockConnection]; // Clean up connections if necessary if (mConnected) [self disconnect]; @@ -2473,6 +2471,7 @@ void performThreadedKeepAlive(void *ptr) [connectionProxy disconnect]; } + [queryLock release]; if (lastQueryErrorMessage) [lastQueryErrorMessage release]; if (connectionHost) [connectionHost release]; if (connectionLogin) [connectionLogin release]; |