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.
This commit is contained in:
parent
8b5078b7d9
commit
70a5d33c9e
|
@ -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 ||
|
||||
|
|
Loading…
Reference in New Issue
Block a user