Make sure we return only the defined GLX error values

Signed-off-by: Keith Packard <[email protected]>
---
 glx/glxcmds.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 64ebf9e..1ef4899 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -470,7 +470,7 @@ __glXGetDrawable(__GLXcontext * glxc, GLXDrawable drawId, 
ClientPtr client,
                          DixWriteAccess, &pGlxDraw, &rc)) {
         if (glxc != NULL && pGlxDraw->config != glxc->config) {
             client->errorValue = drawId;
-            *error = BadMatch;
+            *error = __glXError(GLXBadDrawable);
             return NULL;
         }
 
@@ -480,7 +480,7 @@ __glXGetDrawable(__GLXcontext * glxc, GLXDrawable drawId, 
ClientPtr client,
     /* No active context and an unknown drawable, bail. */
     if (glxc == NULL) {
         client->errorValue = drawId;
-        *error = BadMatch;
+        *error = __glXError(GLXBadDrawable);
         return NULL;
     }
 
@@ -498,7 +498,7 @@ __glXGetDrawable(__GLXcontext * glxc, GLXDrawable drawId, 
ClientPtr client,
 
     if (pDraw->pScreen != glxc->pGlxScreen->pScreen) {
         client->errorValue = pDraw->pScreen->myNum;
-        *error = BadMatch;
+        *error = __glXError(GLXBadDrawable);
         return NULL;
     }
 
-- 
1.8.4.rc3

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to