diff options
Diffstat (limited to 'Source/SPExtendedTableInfo.m')
-rw-r--r-- | Source/SPExtendedTableInfo.m | 11 |
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:@""]; |