summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xm_dd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/x11/xm_dd.c')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 9c0771e6cdb..516b238d6eb 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -214,10 +214,15 @@ color_mask(GLcontext *ctx,
GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask)
{
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
- XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
+ XMesaBuffer xmbuf;
const int xclass = xmesa->xm_visual->mesa_visual.visualType;
(void) amask;
+ if (ctx->DrawBuffer->Name != 0)
+ return;
+
+ xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
+
if (xclass == GLX_TRUE_COLOR || xclass == GLX_DIRECT_COLOR) {
unsigned long m;
if (rmask && gmask && bmask) {