From 991798822346dbb2d741b1f6d62f4bcb2c889dc8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 9 Mar 2012 08:16:26 -0700 Subject: [PATCH] svga: add null vs pointer check in update_need_pipeline() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Based on a patch submitted by Vic Lee. The other part of his patch which checked the fs pointer wasn't needed. This fixes a crash when clear() is called before any VS or FS is set. But this can only happen when the driver is used without the Mesa state tracker. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca --- src/gallium/drivers/svga/svga_state_need_swtnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/svga/svga_state_need_swtnl.c b/src/gallium/drivers/svga/svga_state_need_swtnl.c index 32355d1..ce4db8d 100644 --- a/src/gallium/drivers/svga/svga_state_need_swtnl.c +++ b/src/gallium/drivers/svga/svga_state_need_swtnl.c @@ -136,7 +136,7 @@ update_need_pipeline( struct svga_context *svga, /* EDGEFLAGS */ - if (vs->base.info.writes_edgeflag) { + if (vs && vs->base.info.writes_edgeflag) { SVGA_DBG(DEBUG_SWTNL, "%s: edgeflags\n", __FUNCTION__); need_pipeline = TRUE; } -- 2.7.4