diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2024-07-26 14:14:15 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2024-07-26 14:14:15 (GMT) |
commit | b3ea008132706a6ad972d0323a956359d28b9891 (patch) | |
tree | ba1c268cd13ac62a3ef033c2e6060e422e446e7b | |
parent | 9ae6bc5321e3c93ac3ae2a96b6842232f60a770e (diff) | |
download | tk-b3ea008132706a6ad972d0323a956359d28b9891.zip tk-b3ea008132706a6ad972d0323a956359d28b9891.tar.gz tk-b3ea008132706a6ad972d0323a956359d28b9891.tar.bz2 |
Fix crash - clipboard cleanup after main window destroyed
-rw-r--r-- | win/tkWinWm.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index ba52b32..e3948e0 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -2463,7 +2463,15 @@ TkpWmGetState( static void CheckForPointer(TkWindow *winPtr) { - POINT mouse; + if (winPtr == NULL || winPtr->mainPtr == NULL) { + /* + * Bug [d233f01e2a] - clipboard clean up after main window destroyed + * Nothing to do. + */ + return; + } + + POINT mouse; int x, y; unsigned int state = TkWinGetModifierState(); TkWindow **windows = TkWmStackorderToplevel(winPtr->mainPtr->winPtr); |