summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xm_dd.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-03-28 15:21:44 +0000
committerBrian Paul <[email protected]>2006-03-28 15:21:44 +0000
commitc7a5d528c7e5f4812b423bf4c091d21c34af3cf1 (patch)
tree0cfaeee8d45666c644ad22f4a7b164e0de83d056 /src/mesa/drivers/x11/xm_dd.c
parentb8915340eab706776244e04547f64444f0ff2f8b (diff)
a little code movement so we don't make invalid casts from gl_renderbuffers to xmesa_renderbuffers
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) {