--- glx/glxcmds.c.tv 2010-10-10 12:12:58.000000000 +0200 +++ glx/glxcmds.c 2010-10-10 12:14:54.000000000 +0200 @@ -493,6 +493,7 @@ * matches the context screen and that the context fbconfig is * compatible with the window visual. */ + if (!glxc == NULL) { rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess); if (rc != Success || pDraw->type != DRAWABLE_WINDOW) { client->errorValue = drawId; @@ -512,6 +513,7 @@ pGlxDraw = glxc->pGlxScreen->createDrawable(glxc->pGlxScreen, pDraw, GLX_DRAWABLE_WINDOW, drawId, glxc->config); + } /* since we are creating the drawablePrivate, drawId should be new */ if (!AddResource(drawId, __glXDrawableRes, pGlxDraw)) {