File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -404,7 +404,8 @@ - (void)loadTable:(NSString *)table
404
404
[tableSizeFree setStringValue: [self _formatValueWithKey: SPMySQLDataFreeField inDictionary: statusFields]];
405
405
406
406
// Set comments
407
- NSString *commentText = [statusFields objectForKey: SPMySQLCommentField];
407
+ // Note: On MySQL the comment column is marked as NOT NULL, but we still received crash reports because it was NULL!? (#2791)
408
+ NSString *commentText = [[statusFields objectForKey: SPMySQLCommentField] unboxNull ];
408
409
409
410
if (!commentText) commentText = @" " ;
410
411
@@ -541,7 +542,7 @@ - (void)textDidEndEditing:(NSNotification *)notification
541
542
542
543
if ((object == tableCommentsTextView) && ([object isEditable ]) && ([selectedTable length ] > 0 )) {
543
544
544
- NSString *currentComment = [[tableDataInstance statusValueForKey: @" Comment " ] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet ]];
545
+ NSString *currentComment = [[[ tableDataInstance statusValueForKey: SPMySQLCommentField] unboxNull ] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet ]];
545
546
NSString *newComment = [[tableCommentsTextView string ] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet ]];
546
547
547
548
// Check that the user actually changed the tables comment
You can’t perform that action at this time.
0 commit comments