diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index a6057d3334e..09fe37190e3 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -507,7 +507,7 @@ intelInitContext(struct intel_context *intel, _mesa_meta_init(ctx); - intel->hw_stencil = mesaVis->stencilBits && mesaVis->depthBits == 24; + intel->hw_stencil = mesaVis && mesaVis->stencilBits && mesaVis->depthBits == 24; intel->hw_stipple = 1; intel->RenderIndex = ~0;