summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-11-25 09:54:34 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-11-25 09:54:34 (GMT)
commit48ab1488e7104ed9f9b90435951cf56e4ad3d2ed (patch)
tree0664577cece5afeb14be8cf798c78585132cad6b /macosx
parentca27387956e16b5983011ccf2205e9e1229a03a6 (diff)
downloadtk-48ab1488e7104ed9f9b90435951cf56e4ad3d2ed.zip
tk-48ab1488e7104ed9f9b90435951cf56e4ad3d2ed.tar.gz
tk-48ab1488e7104ed9f9b90435951cf56e4ad3d2ed.tar.bz2
Fix [9c098a90e6]: macOS Aqua : crash in setMarkedText. Patch from Christopher Chavez.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXKeyEvent.c3
1 files changed, 3 insertions, 0 deletions
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;