summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-03-09 08:16:26 -0700
committerBrian Paul <[email protected]>2012-03-09 08:25:18 -0700
commit991798822346dbb2d741b1f6d62f4bcb2c889dc8 (patch)
tree28aa2cee3f8a0dfc65786025d052f83904fa2a02 /src/gallium/drivers/svga
parentfb3cb5c2dd9761ff697584a8f7943051dac24142 (diff)
svga: add null vs pointer check in update_need_pipeline()
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_state_need_swtnl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_state_need_swtnl.c b/src/gallium/drivers/svga/svga_state_need_swtnl.c
index 32355d136cd..ce4db8da5df 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;
}