summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 c56adfa5587..3c366bfa1e4 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;