diff options
author | rowanbeentje <rowan@beent.je> | 2010-09-18 13:41:30 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-09-18 13:41:30 +0000 |
commit | db8ab76fad224642ded1de75bf531763e2acfffb (patch) | |
tree | c4433c057baac83121ce54f20cb6d0d2f91030e2 /Frameworks/MCPKit/MCPFoundationKit | |
parent | 3b9f9e101c56130afcc9d83339c0bd01d1bbaa3c (diff) | |
download | sequelpro-db8ab76fad224642ded1de75bf531763e2acfffb.tar.gz sequelpro-db8ab76fad224642ded1de75bf531763e2acfffb.tar.bz2 sequelpro-db8ab76fad224642ded1de75bf531763e2acfffb.zip |
- Fix crashes triggered by connection unlocking after disconnection; this addresses http://spbug.com/l/1269 and possibly improves the vio_delete crashes
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit')
-rw-r--r-- | Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m index c9ab0b12..3bdc796a 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m @@ -2022,13 +2022,13 @@ void performThreadedKeepAlive(void *ptr) // We check if the connection actually was busy. If it wasn't busy, // it means we probably tried to unlock the connection twice. This is // potentially dangerous, therefore we log this to the console - if ([connectionLock condition]!=MCPConnectionBusy) { + if ([connectionLock condition] != MCPConnectionBusy) { NSLog(@"Tried to unlock the connection, but it wasn't locked."); } // Since we connected with CLIENT_MULTI_RESULT, we must make sure there are nor more results! // This is still a bit of a dirty hack - if (mysql_more_results(mConnection)) { + if (mConnected && mConnection && mConnection->net.vio && mConnection->net.buff && mysql_more_results(mConnection)) { NSLog(@"Discarding unretrieved results. This is currently normal when using CALL."); [self flushMultiResults]; } |