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 <ajax@redhat.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user