From: Kurt Roeckx Date: Thu, 10 May 2012 22:19:42 +0000 (+0200) Subject: i830: Fix crash for GL_STENCIL_TEST in i830Enable() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f92b2e5e90f456491fc15b3b9612381a83726606;p=mesa.git i830: Fix crash for GL_STENCIL_TEST in i830Enable() commit 87f12bb2d95236c7b025d1a8be56b5ab1683d702 tried to fix rb->mt being NULL, but change this case wrong. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Kurt Roeckx Reviewed-by: Eric Anholt Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c index 6f8bd69481f..647ba62c03c 100644 --- a/src/mesa/drivers/dri/i915/i830_state.c +++ b/src/mesa/drivers/dri/i915/i830_state.c @@ -862,7 +862,7 @@ i830Enable(struct gl_context * ctx, GLenum cap, GLboolean state) if (ctx->DrawBuffer) { struct intel_renderbuffer *irbStencil = intel_get_renderbuffer(ctx->DrawBuffer, BUFFER_STENCIL); - hw_stencil = (irbStencil && irbStencil->mt->region); + hw_stencil = (irbStencil && irbStencil->mt); } if (hw_stencil) { I830_STATECHANGE(i830, I830_UPLOAD_CTX);