summaryrefslogtreecommitdiff
path: root/src/glx/x11/dri2_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/x11/dri2_glx.c')
-rw-r--r--src/glx/x11/dri2_glx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c
index c56adfa558..3c366bfa1e 100644
--- a/src/glx/x11/dri2_glx.c
+++ b/src/glx/x11/dri2_glx.c
@@ -211,6 +211,9 @@ dri2GetBuffers(__DRIdrawable *driDrawable,
buffers = DRI2GetBuffers(pdraw->base.psc->dpy, pdraw->base.xDrawable,
width, height, attachments, count, out_count);
+ if (buffers == NULL)
+ return NULL;
+
pdraw->width = *width;
pdraw->height = *height;