aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx/dri2_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r--src/glx/dri2_glx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index b83da60fe77..2d72ae05f04 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -543,6 +543,10 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
(struct dri2_display *)dpyPriv->dri2Display;
CARD64 ret = 0;
+ /* Check we have the right attachments */
+ if (!priv->have_back)
+ return ret;
+
/* Old servers can't handle swapbuffers */
if (!pdp->swapAvailable) {
dri2CopySubBuffer(pdraw, 0, 0, priv->width, priv->height);