summaryrefslogtreecommitdiffstats
path: root/generic/tkBind.c
diff options
context:
space:
mode:
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);
}