diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXKeyEvent.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index 2452c1d..07f7107 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; } } |