summaryrefslogtreecommitdiffstats
path: root/generic/tkBind.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-05-26 20:46:06 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-05-26 20:46:06 (GMT)
commitef21094dd7164fbf1d96d8c33570f4803b7e35e6 (patch)
tree2fab67c4ed0e4acafdb7b17c3f7472bd431532c9 /generic/tkBind.c
parentbfc87e3ce9f57f6f966f6cf423d1064487cb887b (diff)
downloadtk-ef21094dd7164fbf1d96d8c33570f4803b7e35e6.zip
tk-ef21094dd7164fbf1d96d8c33570f4803b7e35e6.tar.gz
tk-ef21094dd7164fbf1d96d8c33570f4803b7e35e6.tar.bz2
More complete fix for [79549a9134] - Mouse pointer warping crashes, with a non-regression test case.
Diffstat (limited to 'generic/tkBind.c')
-rw-r--r--generic/tkBind.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 81c768b..4374494 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -3537,11 +3537,12 @@ DoWarp(
/*
* DoWarp was scheduled only if the window was mapped. It needs to be
- * still mapped at the time the present idle callback is executed. In
- * particular, this guards against window destruction in the meantime.
+ * still mapped at the time the present idle callback is executed. Also
+ * one needs to guard against window destruction in the meantime.
*/
- if (Tk_IsMapped(dispPtr->warpWindow)) {
+ if (Tk_IsMapped(dispPtr->warpWindow)
+ && (Tk_WindowId(dispPtr->warpWindow) != None)) {
TkpWarpPointer(dispPtr);
XForceScreenSaver(dispPtr->display, ScreenSaverReset);
}