From 48ab1488e7104ed9f9b90435951cf56e4ad3d2ed Mon Sep 17 00:00:00 2001 From: fvogel Date: Sat, 25 Nov 2023 09:54:34 +0000 Subject: Fix [9c098a90e6]: macOS Aqua : crash in setMarkedText. Patch from Christopher Chavez. --- macosx/tkMacOSXKeyEvent.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index f313c90..7b87904 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -417,6 +417,9 @@ static NSUInteger textInputModifiers; replacementRange: (NSRange)repRange { TkWindow *winPtr = TkMacOSXGetTkWindow([self window]); + if (!winPtr) { + return; + } Tk_Window focusWin = (Tk_Window)winPtr->dispPtr->focusPtr; NSString *temp; NSString *str; -- cgit v0.12