summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXKeyEvent.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-05-10 06:44:15 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-05-10 06:44:15 (GMT)
commitae887dc099e08cdfc59332f954de871227c36e08 (patch)
tree59bf5cb8536bd8bc3b277e2ed94e242eedcd9dd2 /macosx/tkMacOSXKeyEvent.c
parent7653fd57944db2a7fd92a7dc515faaf4d83026bc (diff)
parent70c6e349bd72cef2ade7c9f9ed14865f0fcca101 (diff)
downloadtk-ae887dc099e08cdfc59332f954de871227c36e08.zip
tk-ae887dc099e08cdfc59332f954de871227c36e08.tar.gz
tk-ae887dc099e08cdfc59332f954de871227c36e08.tar.bz2
Merge 8.6
Diffstat (limited to 'macosx/tkMacOSXKeyEvent.c')
-rw-r--r--macosx/tkMacOSXKeyEvent.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c
index 14d305f..76626cc 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -94,7 +94,10 @@ static NSUInteger textInputModifiers;
if (grabWinPtr) {
if (winPtr->dispPtr->grabFlags || /* global grab */
grabWinPtr->mainPtr == winPtr->mainPtr){ /* same application */
- winPtr =winPtr->dispPtr->focusPtr;
+ winPtr = winPtr->dispPtr->focusPtr;
+ if (!winPtr) {
+ return theEvent;
+ }
tkwin = (Tk_Window)winPtr;
}
}