Skip to content

Commit

Permalink
Fix one cause a popular crash involving alert dialogs (part of #2297)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoagx committed Oct 19, 2015
1 parent 747f03c commit e12e3e8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Source/SPTableContent.m
Expand Up @@ -985,12 +985,13 @@ - (void) loadTableValues
#ifndef SP_CODA
if(activeFilter == 0) {
#endif
NSString *errorDetail;
if(filterString)
SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"The table data couldn't be loaded presumably due to used filter clause. \n\nMySQL said: %@", @"message of panel when loading of table failed and presumably due to used filter argument"), [mySQLConnection lastErrorMessage]]);
errorDetail = [NSString stringWithFormat:NSLocalizedString(@"The table data couldn't be loaded presumably due to used filter clause. \n\nMySQL said: %@", @"message of panel when loading of table failed and presumably due to used filter argument"), [mySQLConnection lastErrorMessage]];
else
SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"The table data couldn't be loaded.\n\nMySQL said: %@", @"message of panel when loading of table failed"), [mySQLConnection lastErrorMessage]]);
errorDetail = [NSString stringWithFormat:NSLocalizedString(@"The table data couldn't be loaded.\n\nMySQL said: %@", @"message of panel when loading of table failed"), [mySQLConnection lastErrorMessage]];

SPOnewayAlertSheet(NSLocalizedString(@"Error", @"error"), nil, [tableDocumentInstance parentWindow], errorDetail, NSWarningAlertStyle);
}
#ifndef SP_CODA
// Filter task came from filter table
Expand Down

0 comments on commit e12e3e8

Please sign in to comment.