diff options
author | culler <culler> | 2021-05-08 12:33:41 (GMT) |
---|---|---|
committer | culler <culler> | 2021-05-08 12:33:41 (GMT) |
commit | 95c60df9d7fad7c5fa9cd8748740ebceb3148165 (patch) | |
tree | 846687368269536d3f83b689ef7fe4421e29e396 /macosx | |
parent | e90c3f6d3a2bec9a074ebbbac695bda5557c6df5 (diff) | |
parent | 1db0bf3fc72cd67217b6173d6e269f97c032b2f8 (diff) | |
download | tk-95c60df9d7fad7c5fa9cd8748740ebceb3148165.zip tk-95c60df9d7fad7c5fa9cd8748740ebceb3148165.tar.gz tk-95c60df9d7fad7c5fa9cd8748740ebceb3148165.tar.bz2 |
Prevent the crash related to [171ba701e5]. More work is needed to preserve the grab state when the app is deactivated.
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; } } |