aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m')
-rw-r--r--Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m b/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m
index 4dec74a6..ee8853c7 100644
--- a/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m
+++ b/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m
@@ -117,7 +117,13 @@ PGQueryParamData;
{
_lastQueryWasCancelled = NO;
- if (![self isConnected] || !query || ![query isKindOfClass:[NSString class]] || [query isKindOfClass:[PGPostgresStatement class]]) return nil;
+ if (!query ||
+ ![query isKindOfClass:[NSString class]] ||
+ ![query isKindOfClass:[PGPostgresStatement class]] ||
+ ![self isConnected])
+ {
+ return nil;
+ }
// Notify the delegate
if (_delegate && _delegateSupportsWillExecute) {