glx: Fix a regression in the new XCB code
authorFredrik Höglund <fredrik@kde.org>
Mon, 15 Oct 2012 19:02:05 +0000 (21:02 +0200)
committerFredrik Höglund <fredrik@kde.org>
Tue, 16 Oct 2012 00:24:42 +0000 (02:24 +0200)
commit0978707917e68fdb2da4035a810480622fed5410
tree52952946eb3f03fdaa5612b358bad017cd9066b5
parentdf3721fd2e10ef27ce12a0c1025c9770137fa8f7
glx: Fix a regression in the new XCB code

dri2DrawableGetMSC(), dri2WaitForMSC() and dri2WaitForSBC() were
inadvertently changed to return 0 on success.  This resulted in the callers
returning an error to the client.

Restore the previous behavior and also check that the reply pointers are
valid before accessing them.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/glx/dri2_glx.c