summaryrefslogtreecommitdiffstats
path: root/src/glx/glx_pbuffer.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2011-05-03 10:20:14 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2011-05-04 14:08:48 -0700
commit6ae9e8cbabdc8a18a821ea3f716b18b3eb82a495 (patch)
tree8c014701e23d64c98fae75f63e6d70387cb5a420 /src/glx/glx_pbuffer.c
parent37058c3497850f452bdaf70a5dda07ee4840b6b9 (diff)
downloadexternal_mesa3d-6ae9e8cbabdc8a18a821ea3f716b18b3eb82a495.zip
external_mesa3d-6ae9e8cbabdc8a18a821ea3f716b18b3eb82a495.tar.gz
external_mesa3d-6ae9e8cbabdc8a18a821ea3f716b18b3eb82a495.tar.bz2
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>
Diffstat (limited to 'src/glx/glx_pbuffer.c')
-rw-r--r--src/glx/glx_pbuffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c
index 5f91bc6..ec54f1e 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: