Commit c03cfca3 authored by Adam Jackson's avatar Adam Jackson 💣

Coverity #986: Prevent a NULL chase.

parent 07ecf495
2006-04-02 Adam Jackson <ajax@freedesktop.org>
* GL/glx/glxcmds.c:
Coverity #986: Prevent a NULL chase.
2006-04-02 Adam Jackson <ajax@freedesktop.org>
* Xext/sync.c:
......
......@@ -1926,10 +1926,10 @@ static int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
XID drawable = req->drawable;
int barrier = req->barrier;
DrawablePtr pDraw = (DrawablePtr) LookupDrawable(drawable, client);
int screen = pDraw->pScreen->myNum;
int screen;
if (pDraw && (pDraw->type == DRAWABLE_WINDOW)) {
screen = pDraw->pScreen->myNum;
if (__glXSwapBarrierFuncs &&
__glXSwapBarrierFuncs[screen].bindSwapBarrierFunc) {
int ret = __glXSwapBarrierFuncs[screen].bindSwapBarrierFunc(screen, drawable, barrier);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment