diff options
author | Keith Packard <keithp@neko.keithp.com> | 2007-02-19 15:28:37 -0800 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2007-02-19 15:33:24 -0800 |
commit | d3e3490ac02cfe31b04637f847b30acf849a619a (patch) | |
tree | ff41114131e23147b8cb2cf3d53f7ec15788fd17 | |
parent | 63cc2a51ef87130c632a874672a8c9167f14314e (diff) |
Check for clientGone before sending events from XFixes (bug #1753).
Freeing resources during client closedown can cause cursor changes which
attempt to send cursor events through the XFixes extension; a client in the
process of closing down has no file to send events to, causing a crash when
this path is hit.
(cherry picked from commit 8a42af6a935b1cf0e15102e986bb527f4fab31a8)
-rwxr-xr-x | xfixes/cursor.c | 3 | ||||
-rwxr-xr-x | xfixes/select.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c index c75e74442..bfccadb0c 100755 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -143,7 +143,8 @@ CursorDisplayCursor (ScreenPtr pScreen, CursorCurrent = pCursor; for (e = cursorEvents; e; e = e->next) { - if (e->eventMask & XFixesDisplayCursorNotifyMask) + if ((e->eventMask & XFixesDisplayCursorNotifyMask) && + !e->pClient->clientGone) { xXFixesCursorNotifyEvent ev; ev.type = XFixesEventBase + XFixesCursorNotify; diff --git a/xfixes/select.c b/xfixes/select.c index 4c7a49def..77f2c2702 100755 --- a/xfixes/select.c +++ b/xfixes/select.c @@ -78,7 +78,9 @@ XFixesSelectionCallback (CallbackListPtr *callbacks, pointer data, pointer args) } for (e = selectionEvents; e; e = e->next) { - if (e->selection == selection->selection && (e->eventMask & eventMask)) + if (e->selection == selection->selection && + (e->eventMask & eventMask) && + !e->pClient->clientGone) { xXFixesSelectionNotifyEvent ev; |