aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-09-18 13:41:30 +0000
committerrowanbeentje <rowan@beent.je>2010-09-18 13:41:30 +0000
commitdb8ab76fad224642ded1de75bf531763e2acfffb (patch)
treec4433c057baac83121ce54f20cb6d0d2f91030e2 /Frameworks
parent3b9f9e101c56130afcc9d83339c0bd01d1bbaa3c (diff)
downloadsequelpro-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')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m4
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];
}