diff options
author | culler <culler> | 2022-01-06 18:22:41 (GMT) |
---|---|---|
committer | culler <culler> | 2022-01-06 18:22:41 (GMT) |
commit | f44b0ff7437015b57f24ce1ff585100f80d05c5e (patch) | |
tree | 9b7d7f8d14cf72d936bd0b59ffe60195a2283566 /macosx | |
parent | 8a3569b1a0838f8f500218837c0ff6ef13ac93cd (diff) | |
download | tk-f44b0ff7437015b57f24ce1ff585100f80d05c5e.zip tk-f44b0ff7437015b57f24ce1ff585100f80d05c5e.tar.gz tk-f44b0ff7437015b57f24ce1ff585100f80d05c5e.tar.bz2 |
Fix [b7d851e988]: crash caused by not finding the toplevel for the dragTarget in tkWmDeadWindow.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXWm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 9391906..7b06200 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -978,6 +978,7 @@ TkWmDeadWindow( { WmInfo *wmPtr = winPtr->wmInfoPtr, *wmPtr2; TKWindow *deadNSWindow; + TkWindow *dragTarget = [NSApp tkDragTarget]; if (wmPtr == NULL) { return; @@ -1057,7 +1058,7 @@ TkWmDeadWindow( * state which is recorded in the NSApplication object. */ - if (winPtr == [NSApp tkDragTarget]) { + if (dragTarget && winPtr == TkMacOSXGetHostToplevel(dragTarget)->winPtr) { [NSApp setTkDragTarget:nil]; } if (winPtr == [NSApp tkPointerWindow]) { |