From bfa1a0dd190ed88020d60eba3bb04681c8e83a68 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 24 Jan 2011 11:17:03 +0000 Subject: DRI2: Avoid a NULL pointer dereference Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41211 Signed-off-by: Chris Wilson Reviewed-by: Jeremy Huddleston --- hw/xfree86/dri2/dri2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index a97508d21..dd56f9ca4 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -816,7 +816,8 @@ DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable) /* If we're currently waiting for a swap on this drawable, reset * the request and suspend the client. We only support one * blocked client per drawable. */ - if ((pPriv->swapsPending) && + if (pPriv && + pPriv->swapsPending && pPriv->blockedClient == NULL) { ResetCurrentRequest(client); client->sequence--; -- cgit v1.2.3