added CHAN_BITS != 8 test
authorBrian Paul <brian.paul@tungstengraphics.com>
Sun, 7 May 2006 16:16:23 +0000 (16:16 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sun, 7 May 2006 16:16:23 +0000 (16:16 +0000)
src/mesa/drivers/x11/xm_line.c

index 17995031145ac671a12f6fd10e0dd68be28c5554..edb2a211699f0986f9fd7e32d0342a20b6bb271b 100644 (file)
@@ -578,6 +578,9 @@ get_line_func(GLcontext *ctx)
    int depth = GET_VISUAL_DEPTH(xmesa->xm_visual);
    struct xmesa_renderbuffer *xrb;
 
+   if (CHAN_BITS != 8)
+      return NULL;
+
    if ((ctx->DrawBuffer->_ColorDrawBufferMask[0]
         & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)) == 0)
       return (swrast_line_func) NULL;