diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-24 11:17:03 +0000 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-11-18 11:26:02 -0800 |
commit | bfa1a0dd190ed88020d60eba3bb04681c8e83a68 (patch) | |
tree | cee3eeaec67d1412cd91551362c51d40b75d6a77 | |
parent | eeb21a133b982f71de739baf62e53c8a68f5d495 (diff) |
DRI2: Avoid a NULL pointer dereference
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41211
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | hw/xfree86/dri2/dri2.c | 3 |
1 files changed, 2 insertions, 1 deletions
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--; |