summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-11-25 09:54:48 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-11-25 09:54:48 (GMT)
commit26585c584f525a1c402be7eb555b6336b4bfcf27 (patch)
tree5ab9331a41700b32c8db49f34c9d1ad73fa0d9fc /macosx
parentcaffb0fe4d1304db45c243880545c1fa3eb17cf2 (diff)
parent48ab1488e7104ed9f9b90435951cf56e4ad3d2ed (diff)
downloadtk-26585c584f525a1c402be7eb555b6336b4bfcf27.zip
tk-26585c584f525a1c402be7eb555b6336b4bfcf27.tar.gz
tk-26585c584f525a1c402be7eb555b6336b4bfcf27.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 d282427..c9449da 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;