summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_blit.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-01-22 21:11:55 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-22 21:11:55 -0700
commit2a077500a84819d1e6ac62e84ded130aa655c5e9 (patch)
treee16cbba8051acc5ee5fc4409e5697e11d0041989 /src/mesa/swrast/s_blit.c
parente1ae5b89fce51ce1138a5cbe93caa0e1fccf219f (diff)
Fix some issues with glDrawBuffer(GL_NONE), bug 14198
Set _ColorDrawBuffers[0] = NULL if no renderbuffers enabled. Check that _ColorDrawBuffers[0] is non-null before dereferencing in a few places.
Diffstat (limited to 'src/mesa/swrast/s_blit.c')
-rw-r--r--src/mesa/swrast/s_blit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c
index a2c40bd9a6..af4350990c 100644
--- a/src/mesa/swrast/s_blit.c
+++ b/src/mesa/swrast/s_blit.c
@@ -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;