diff options
author | Ian Romanick <[email protected]> | 2009-04-11 14:02:33 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-04-14 14:32:52 -0600 |
commit | 153012b29b4f2183a1be6a01eec63e720a192718 (patch) | |
tree | c88bc6c9445aa78ccef2ed4d1c816019e496ab86 /src/mesa/drivers/dri | |
parent | cafea7528052624c8d3e4cd1c5b26a61bf04d1d0 (diff) |
DRI2: Don't fault on NULL DrawBuffer
It is possible for ctx->DrawBuffer to be NULL, so don't fault when
that happens. This change is not being committed to master because it
doesn't appear to be necessary there.
Signed-off-by: Ian Romanick <[email protected]>
Cherry picked from mesa_7_4_branch, commit 49e0c74ddd91900fc4effb6d305d56e0563b456d
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_buffers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c index f1249f7635a..90964df3553 100644 --- a/src/mesa/drivers/dri/intel/intel_buffers.c +++ b/src/mesa/drivers/dri/intel/intel_buffers.c @@ -321,7 +321,7 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb) static void intelDrawBuffer(GLcontext * ctx, GLenum mode) { - if (ctx->DrawBuffer->Name == 0) { + if ((ctx->DrawBuffer != NULL) && (ctx->DrawBuffer->Name == 0)) { struct intel_context *const intel = intel_context(ctx); intel->is_front_buffer_rendering = (mode == GL_FRONT_LEFT); |