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>
This commit is contained in:
Chris Wilson 2011-01-24 11:17:03 +00:00 committed by Jeremy Huddleston
parent eeb21a133b
commit bfa1a0dd19

View File

@ -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--;