aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-10-18 08:35:57 +0200
committerMax <post@wickenrode.com>2015-10-18 08:35:57 +0200
commit747f03cd9fb14f06bffd33adb60b949733296a31 (patch)
tree0d08bd4641716fdef060bb7f9ef915ef20512e64 /Source
parent4d97cbd4df1ebb451d89d6c4e12dd7c622d00b84 (diff)
downloadsequelpro-747f03cd9fb14f06bffd33adb60b949733296a31.tar.gz
sequelpro-747f03cd9fb14f06bffd33adb60b949733296a31.tar.bz2
sequelpro-747f03cd9fb14f06bffd33adb60b949733296a31.zip
Avoid a seldom exception when a VIEW is selected and there a connection issues
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTableData.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/SPTableData.m b/Source/SPTableData.m
index 17316fbf..bf1aec20 100644
--- a/Source/SPTableData.m
+++ b/Source/SPTableData.m
@@ -870,6 +870,12 @@
// Retrieve the table syntax string
if (tableCreateSyntax) SPClear(tableCreateSyntax);
NSString *syntaxString = [[theResult getRowAsArray] objectAtIndex:1];
+
+ // Crash reports indicate that this does happen, however I'm not sure why.
+ if (!syntaxString) {
+ NSLog(@"%s: query for 'SHOW CREATE TABLE' returned nil but there was no connection error!? queryErrored=%d, userTriggeredDisconnect=%d, isConnected=%d, theResult=%@",__func__,[mySQLConnection queryErrored],[mySQLConnection userTriggeredDisconnect],[mySQLConnection isConnected],theResult);
+ return nil;
+ }
// A NULL value indicates that the user does not have permission to view the syntax
if ([syntaxString isNSNull]) {