Fix some issues with glDrawBuffer(GL_NONE), bug 14198
[mesa.git] / src / mesa / swrast / s_blit.c
index a2c40bd9a6b30f58a29d570c7b5998ea35483ddf..af4350990c0470386d106319e1b873402f4a975e 100644 (file)
@@ -745,6 +745,9 @@ _swrast_BlitFramebuffer(GLcontext *ctx,
    };
    GLint i;
 
+   if (!ctx->DrawBuffer->_NumColorDrawBuffers)
+      return;
+
    if (!clip_blit(ctx, &srcX0, &srcY0, &srcX1, &srcY1,
                   &dstX0, &dstY0, &dstX1, &dstY1)) {
       return;