mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
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 <ian.d.romanick@intel.com>
Cherry picked from mesa_7_4_branch, commit 49e0c74ddd
This commit is contained in:
parent
cafea75280
commit
153012b29b
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue