aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/MCPKit')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m12
1 files changed, 7 insertions, 5 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
index 5fd3a9a2..27ae11ae 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
@@ -2412,12 +2412,14 @@ void performThreadedKeepAlive(void *ptr)
[self lockConnection];
- if (theResPtr = mysql_list_processes(mConnection)) {
- result = [[MCPResult alloc] initWithResPtr:theResPtr encoding:mEncoding timeZone:mTimeZone];
+ if (mConnected && (mConnection != NULL)) {
+ if (theResPtr = mysql_list_processes(mConnection)) {
+ result = [[MCPResult alloc] initWithResPtr:theResPtr encoding:mEncoding timeZone:mTimeZone];
+ }
+ else {
+ result = [[MCPResult alloc] init];
+ }
}
- else {
- result = [[MCPResult alloc] init];
- }
[self unlockConnection];