From: Jesse Barnes Date: Tue, 3 May 2011 17:20:14 +0000 (-0700) Subject: GLX: don't crash when indirect clients try to set an event mask X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ae9e8cbabdc8a18a821ea3f716b18b3eb82a495;p=mesa.git GLX: don't crash when indirect clients try to set an event mask After sending the GLXChangeDrawableAttributes request, we also set a local set of attributes on the DRI drawable. But in the indirect case this array won't be present, so skip the setting in that case to avoid a crash. Reviewed-by: Adam Jackson Signed-off-by: Jesse Barnes --- diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c index 5f91bc623a9..ec54f1e09d6 100644 --- a/src/glx/glx_pbuffer.c +++ b/src/glx/glx_pbuffer.c @@ -137,6 +137,9 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable, #ifdef GLX_DIRECT_RENDERING pdraw = GetGLXDRIDrawable(dpy, drawable); + if (!pdraw) + return; + for (i = 0; i < num_attribs; i++) { switch(attribs[i * 2]) { case GLX_EVENT_MASK: