From 5357fd1375d19a6c5de96293b3899f430422a3c0 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Oct 2015 15:24:10 +0200 Subject: Replace a lot of SPBeginAlertSheet()s with the more concise SPOnewayAlertSheet() This should also eliminate a few use-after-free crashes --- Source/SPTableRelations.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Source/SPTableRelations.m') diff --git a/Source/SPTableRelations.m b/Source/SPTableRelations.m index 134aa2fb..8a2a1568 100644 --- a/Source/SPTableRelations.m +++ b/Source/SPTableRelations.m @@ -526,10 +526,11 @@ static NSString *SPRelationOnDeleteKey = @"on_delete"; if ([connection queryErrored]) { - SPBeginAlertSheet(NSLocalizedString(@"Unable to delete relation", @"error deleting relation message"), - NSLocalizedString(@"OK", @"OK button"), - nil, nil, [NSApp mainWindow], nil, nil, nil, - [NSString stringWithFormat:NSLocalizedString(@"The selected relation couldn't be deleted.\n\nMySQL said: %@", @"error deleting relation informative message"), [connection lastErrorMessage]]); + SPOnewayAlertSheet( + NSLocalizedString(@"Unable to delete relation", @"error deleting relation message"), + [NSApp mainWindow], + [NSString stringWithFormat:NSLocalizedString(@"The selected relation couldn't be deleted.\n\nMySQL said: %@", @"error deleting relation informative message"), [connection lastErrorMessage]] + ); // Abort loop break; -- cgit v1.2.3