aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExtendedTableInfo.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-03-31 00:34:03 +0000
committerrowanbeentje <rowan@beent.je>2010-03-31 00:34:03 +0000
commitb9f5c468900eca5748392d61a603b425492706f6 (patch)
treebee5f4c2ca46d39ec2e76972f089fba9e802be15 /Source/SPExtendedTableInfo.m
parentd060c9f395f938d1d1adeec0ce8a9444267bdebf (diff)
downloadsequelpro-b9f5c468900eca5748392d61a603b425492706f6.tar.gz
sequelpro-b9f5c468900eca5748392d61a603b425492706f6.tar.bz2
sequelpro-b9f5c468900eca5748392d61a603b425492706f6.zip
- Improve error checking for various actions, particularly permissions errors (NULL data returned) for views and stored procedures. This should fix http://log.sequelpro.com/view/27 , http://log.sequelpro.com/view/57 , and the last of http://log.sequelpro.com/view/53
Diffstat (limited to 'Source/SPExtendedTableInfo.m')
-rw-r--r--Source/SPExtendedTableInfo.m11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/SPExtendedTableInfo.m b/Source/SPExtendedTableInfo.m
index 216057e0..9636ca4c 100644
--- a/Source/SPExtendedTableInfo.m
+++ b/Source/SPExtendedTableInfo.m
@@ -238,11 +238,12 @@
[tableCreateSyntaxTextView setString:@""];
NSString *createViewSyntax = [[tableDataInstance tableCreateSyntax] createViewSyntaxPrettifier];
-
- [tableCreateSyntaxTextView shouldChangeTextInRange:NSMakeRange(0, 0) replacementString:createViewSyntax];
- [tableCreateSyntaxTextView insertText:createViewSyntax];
- [tableCreateSyntaxTextView didChangeText];
- [tableCreateSyntaxTextView setEditable:NO];
+ if (createViewSyntax) {
+ [tableCreateSyntaxTextView shouldChangeTextInRange:NSMakeRange(0, 0) replacementString:createViewSyntax];
+ [tableCreateSyntaxTextView insertText:createViewSyntax];
+ [tableCreateSyntaxTextView didChangeText];
+ [tableCreateSyntaxTextView setEditable:NO];
+ }
} else {
[tableCreateSyntaxTextView setEditable:YES];
[tableCreateSyntaxTextView shouldChangeTextInRange:NSMakeRange(0, [[tableCreateSyntaxTextView string] length]) replacementString:@""];