diff options
author | Adam Jackson <ajax@nwnk.net> | 2006-04-03 01:31:59 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2006-04-03 01:31:59 +0000 |
commit | c03cfca3806f45948627715b25b46839a07be979 (patch) | |
tree | 0acaf897fe195c83f546711cec9f6c89f113f3ff /GL/glx | |
parent | 07ecf49521973bbb205b199c39e1171f1163df2b (diff) |
Coverity #986: Prevent a NULL chase.
Diffstat (limited to 'GL/glx')
-rw-r--r-- | GL/glx/glxcmds.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c index 0b7525eb9..3845c9289 100644 --- a/GL/glx/glxcmds.c +++ b/GL/glx/glxcmds.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); |