i830: Fix crash for GL_STENCIL_TEST in i830Enable()

commit 87f12bb2d9 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 <kurt@roeckx.be>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit f92b2e5e90)
This commit is contained in:
Kurt Roeckx 2012-05-11 00:19:42 +02:00 committed by Ian Romanick
parent ba45b6deea
commit a72fdfed7b

View file

@ -861,7 +861,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);