summaryrefslogtreecommitdiffstats
path: root/src/glx/x11/glx_pbuffer.c
diff options
context:
space:
mode:
authorDavid Reveman <[email protected]>2006-04-11 12:07:41 +0000
committerDavid Reveman <[email protected]>2006-04-11 12:07:41 +0000
commit342d1de38c25c70f98783a8adc27b2acca2b84ab (patch)
tree15eeff80d271a562f0801ae4cc1bc6aaf41e2505 /src/glx/x11/glx_pbuffer.c
parentbb38cadb1c5f2dc13096a091bdaf61dc3e3cfa4d (diff)
Fix CreateDrawable
Diffstat (limited to 'src/glx/x11/glx_pbuffer.c')
-rw-r--r--src/glx/x11/glx_pbuffer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/glx/x11/glx_pbuffer.c b/src/glx/x11/glx_pbuffer.c
index 59971585d12..cb083fce376 100644
--- a/src/glx/x11/glx_pbuffer.c
+++ b/src/glx/x11/glx_pbuffer.c
@@ -287,6 +287,7 @@ CreateDrawable( Display *dpy, const __GLcontextModes * fbconfig,
xGLXCreateWindowReq * req;
CARD32 * data;
unsigned int i;
+ CARD8 opcode;
i = 0;
if (attrib_list) {
@@ -294,11 +295,16 @@ CreateDrawable( Display *dpy, const __GLcontextModes * fbconfig,
i++;
}
+ opcode = __glXSetupForCommand(dpy);
+ if (!opcode) {
+ return None;
+ }
+
LockDisplay(dpy);
GetReqExtra( GLXCreateWindow, 8 * i, req );
data = (CARD32 *) (req + 1);
- req->reqType = __glXSetupForCommand(dpy);
+ req->reqType = opcode;
req->glxCode = glxCode;
req->screen = (CARD32) fbconfig->screen;
req->fbconfig = fbconfig->fbconfigID;