aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-10-20 01:04:41 +0200
committerMax <post@wickenrode.com>2015-10-20 01:04:41 +0200
commite12e3e86f26b47a51c10940bca1102326d47bf82 (patch)
treefc5f523233ca2ecb672fd1c1b20136ef3adc9b61 /Source
parent747f03cd9fb14f06bffd33adb60b949733296a31 (diff)
downloadsequelpro-e12e3e86f26b47a51c10940bca1102326d47bf82.tar.gz
sequelpro-e12e3e86f26b47a51c10940bca1102326d47bf82.tar.bz2
sequelpro-e12e3e86f26b47a51c10940bca1102326d47bf82.zip
Fix one cause a popular crash involving alert dialogs (part of #2297)
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTableContent.m9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 6b0065dd..618f6c5d 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -985,12 +985,13 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper
#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