From cea120945ca832400a22ae94153ed5c77f03adc3 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Tue, 18 Dec 2012 00:19:04 +0000 Subject: [PATCH] Fixed: CPAlert sheet crash. Without this fix, CPAlert windows would not finish closing before sending the `alertDidEnd:returnCode:` delegate message. This would lead to a crash if the delegate method tried to open a new sheet. This fix makes sure to fully order out the alert sheet before sending the delegate message. --- AppKit/CPAlert.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index 6ed8e1d73..8c5f689b4 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -633,8 +633,8 @@ CPCriticalAlertStyle = 2; { if ([_window isSheet]) { - [CPApp endSheet:_window returnCode:[aSender tag]]; [_window orderOut:nil]; + [CPApp endSheet:_window returnCode:[aSender tag]]; } else {