diff options
author | culler <culler> | 2024-06-13 03:41:50 (GMT) |
---|---|---|
committer | culler <culler> | 2024-06-13 03:41:50 (GMT) |
commit | 55453902cf3de34e45799dbc6fc7f59f6151ef56 (patch) | |
tree | 81dd4268d02c45000bccc83e8872414bf672effb /macosx | |
parent | 31e1c7993caffba710f061daef4aaa36b89845b8 (diff) | |
download | tk-55453902cf3de34e45799dbc6fc7f59f6151ef56.zip tk-55453902cf3de34e45799dbc6fc7f59f6151ef56.tar.gz tk-55453902cf3de34e45799dbc6fc7f59f6151ef56.tar.bz2 |
Try to guard against crashes in TkpChangeFocus
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 1 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 3681d60..d99c06b 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -1175,7 +1175,6 @@ ConfigureRestrictProc( while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {} } } - reentered = 0; } diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index c1c7f92..857524c 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -7225,7 +7225,10 @@ TkpChangeFocus( * didn't originally belong to topLevelPtr's * application. */ { - if (winPtr->atts.override_redirect) { + if (!winPtr || + (winPtr->flags & TK_ALREADY_DEAD) || + !Tk_IsMapped(winPtr) || + winPtr->atts.override_redirect) { return 0; } |