From f92b2e5e90f456491fc15b3b9612381a83726606 Mon Sep 17 00:00:00 2001 From: Kurt Roeckx Date: Fri, 11 May 2012 00:19:42 +0200 Subject: [PATCH] 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 --- src/mesa/drivers/dri/i915/i830_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2