summaryrefslogtreecommitdiff
path: root/GL
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-10-16 12:46:07 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2007-10-16 12:46:07 +0200
commit70a5d33c9e41c077a8cd92abd43376e2956d3aed (patch)
tree537e586ff285c946eaec04a74bef1f4de19814c4 /GL
parent8b5078b7d9ec08a588a78eb49096b698c6f4916b (diff)
Always check the return value of __glXGetDrawable first.
Fixes spurious GLX protocol errors because __glXGetDrawable doesn't set the error code in case of success. Maybe it should, though.
Diffstat (limited to 'GL')
-rw-r--r--GL/glx/glxcmds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c
index 7fd1f4dee..f6e032193 100644
--- a/GL/glx/glxcmds.c
+++ b/GL/glx/glxcmds.c
@@ -1617,7 +1617,7 @@ int __glXDisp_ReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc)
return error;
pGlxDraw = __glXGetDrawable(NULL, drawId, client, &error);
- if (error != Success || pGlxDraw->type != GLX_DRAWABLE_PIXMAP) {
+ if (!pGlxDraw || pGlxDraw->type != GLX_DRAWABLE_PIXMAP) {
client->errorValue = drawId;
return error;
}
@@ -1675,7 +1675,7 @@ int __glXDisp_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc)
}
pGlxDraw = __glXGetDrawable(glxc, drawId, client, &error);
- if (error != Success)
+ if (!pGlxDraw)
return error;
if (pGlxDraw == NULL ||