From f3fe384df176d0d5195fe929454a1b1e09ea5ca1 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sun, 7 Dec 2025 11:28:53 +0100 Subject: [PATCH] fixed: CPDocument sends windowWillClose: message twice --- AppKit/CPDocument.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPDocument.j b/AppKit/CPDocument.j index 8770d57aa..e4a9d696b 100644 --- a/AppKit/CPDocument.j +++ b/AppKit/CPDocument.j @@ -874,7 +874,7 @@ var CPDocumentUntitledCount = 0; if (aDocument === self && shouldClose) [self close]; - if (theDelegate != null) + else if (theDelegate != null) theDelegate.isa.objj_msgSend3(theDelegate, context.selector, aDocument, shouldClose, context.context); }