glx: Compare old ctx against dummyCtx, not NULL

https://bugs.freedesktop.org/show_bug.cgi?id=29302
This commit is contained in:
Kristian Høgsberg 2010-07-29 18:44:26 -04:00
parent cd601513f5
commit f485ee724d
3 changed files with 4 additions and 2 deletions

View File

@ -774,6 +774,8 @@ GetGLXDRIDrawable(Display *dpy, GLXDrawable drawable);
#endif
extern struct glx_context dummyContext;
extern struct glx_screen *
indirect_create_screen(int screen, struct glx_display * priv);
extern struct glx_context *

View File

@ -60,7 +60,7 @@ static GLubyte dummyBuffer[__GLX_BUFFER_LIMIT_SIZE];
** gl and glx entry points are designed to operate as nop's when using
** the dummy context structure.
*/
static struct glx_context dummyContext = {
struct glx_context dummyContext = {
&dummyBuffer[0],
&dummyBuffer[0],
&dummyBuffer[0],

View File

@ -137,7 +137,7 @@ indirect_bind_context(struct glx_context *gc, struct glx_context *old,
Display *dpy = gc->psc->dpy;
int opcode = __glXSetupForCommand(dpy);
if (old && !old->isDirect && old->psc->dpy == dpy)
if (old != &dummyContext && !old->isDirect && old->psc->dpy == dpy)
tag = old->currentContextTag;
else
tag = None;