From db8ab76fad224642ded1de75bf531763e2acfffb Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sat, 18 Sep 2010 13:41:30 +0000 Subject: - Fix crashes triggered by connection unlocking after disconnection; this addresses http://spbug.com/l/1269 and possibly improves the vio_delete crashes --- Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m') 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]; } -- cgit v1.2.3