aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/glx/dri2_glx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 4fbe9496b11..be8671d9069 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -352,13 +352,14 @@ dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y, int width, int height)
region = XFixesCreateRegion(psc->base.dpy, &xrect, 1);
DRI2CopyRegion(psc->base.dpy, pdraw->xDrawable, region,
DRI2BufferFrontLeft, DRI2BufferBackLeft);
- XFixesDestroyRegion(psc->base.dpy, region);
/* Refresh the fake front (if present) after we just damaged the real
* front.
*/
- DRI2CopyRegion(psc->base.dpy, pdraw->xDrawable, region,
- DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft);
+ if (priv->have_fake_front)
+ DRI2CopyRegion(psc->base.dpy, pdraw->xDrawable, region,
+ DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft);
+
XFixesDestroyRegion(psc->base.dpy, region);
}