summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-01-24 11:17:03 +0000
committerJeremy Huddleston <jeremyhu@apple.com>2011-11-21 18:43:49 -0800
commit73beaf9033d9a44e7a7c654f296624c7265eeb6d (patch)
tree57f17c44c315a1220665118f39615a90ec408138
parent6105fcaa3592cb6d0d5f22d9b850986d0bc4d241 (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> (cherry picked from commit bfa1a0dd190ed88020d60eba3bb04681c8e83a68)
-rw-r--r--hw/xfree86/dri2/dri2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index af3bcaefe..d71e4f423 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -780,7 +780,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--;