From ae2c31ed669abab66a8c4b68d8d746e94b9ebf28 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Tue, 18 Mar 2008 15:02:57 +0800 Subject: glx: Add isDirect back to __GLXcontextRec. It is needed to check whether oldGC is used for direct rendering in function MakeContextCurrent. However it is possible oldGC->driContext is already freed. fix bug #14926. --- src/glx/x11/glxcmds.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/glx/x11/glxcmds.c') diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index adf5311674..8d0f07fd0a 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -313,6 +313,7 @@ GLXContext AllocateGLXContext( Display *dpy ) gc->fillImage = __glFillImage; gc->pc = gc->buf; gc->bufEnd = gc->buf + bufSize; + gc->isDirect = GL_FALSE; if (__glXDebug) { /* ** Set limit register so that there will be one command per packet @@ -404,6 +405,7 @@ CreateContext(Display *dpy, XVisualInfo *vis, gc->screen = mode->screen; gc->psc = psc; gc->mode = mode; + gc->isDirect = GL_TRUE; } } #endif -- cgit v1.2.3