From: Pauli Nieminen <ext-pauli.niemi...@nokia.com> If client calls DRI2DestroyDrawable to free DRI2 drawable the client isn't any more intrested in DRI2 events. To avoid confusing the client we should avoid sending the event to the client.
Signed-off-by: Pauli Nieminen <ext-pauli.niemi...@nokia.com> --- hw/xfree86/dri2/dri2.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 28b72f5..145286d 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -856,6 +856,7 @@ DRI2SwapComplete2(DRI2DrawablePtr pPriv, int frame, ClientPtr client = pSwapData->event.client; DrawablePtr pDraw = pPriv->drawable; CARD64 ust = 0; + DRI2DrawableRefPtr ref; pPriv->swapsPending--; pPriv->swap_count++; @@ -866,6 +867,11 @@ DRI2SwapComplete2(DRI2DrawablePtr pPriv, int frame, if (client == NULL) goto out; + ref = DRI2LookupClientDrawableRef(pPriv, client, 0); + + if (ref == NULL) + goto out; + if (pDraw) { BoxRec box; RegionRec region; -- 1.7.0.4 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel