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>
This commit is contained in:
Kurt Roeckx
2012-05-11 00:19:42 +02:00
committed by Kenneth Graunke
parent 8924133627
commit f92b2e5e90
+1 -1
View File
@@ -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);