On 05/14/2014 10:55 AM, Juha-Pekka Heikkila wrote: > For GLX_BACK_BUFFER_AGE_EXT query added extra null check. > > Signed-off-by: Juha-Pekka Heikkila <[email protected]> > --- > src/glx/glx_pbuffer.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c > index 0cd0554..bbfdd65 100644 > --- a/src/glx/glx_pbuffer.c > +++ b/src/glx/glx_pbuffer.c > @@ -319,6 +319,10 @@ GetDrawableAttribute(Display * dpy, GLXDrawable drawable, > pdraw = GetGLXDRIDrawable(dpy, drawable); > > if (attribute == GLX_BACK_BUFFER_AGE_EXT) { > + if (pdraw == NULL) { > + return 0; > + } > +
This code will need more restructuring. If pdraw is NULL, this function should generate GLXBadDrawable (see a few lines lower in the function than is shown in the patch). Maybe just move the assignment of psc lower in the function, and add a '|| pdraw == NULL' to the if-statement below? > struct glx_screen *psc = pdraw->psc; > struct glx_context *gc = __glXGetCurrentContext(); > > _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
