diff options
author | Vinson Lee <[email protected]> | 2013-09-27 21:27:19 -0700 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2013-09-30 22:00:54 -0700 |
commit | 76df7edacfd684f97b38032773a6c56919970b15 (patch) | |
tree | 4366e5b228cc011fd568d275e3eed7ecf2a6d843 /src | |
parent | ac82495d6d562091d819b0109adf43fd89e49537 (diff) |
llvmpipe: Remove unnecessary null check of shader.
shader has already been dereferenced earlier so cannot be null here.
Fixes "Dereference before null check" defect reported by Coverity.
Signed-off-by: Vinson Lee <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 875a3cf11a1..8223d2ad7eb 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -2435,7 +2435,7 @@ generate_variant(struct llvmpipe_context *lp, !shader->info.base.uses_kill ? TRUE : FALSE; - if ((!shader || shader->info.base.num_tokens <= 1) && + if ((shader->info.base.num_tokens <= 1) && !key->depth.enabled && !key->stencil[0].enabled) { variant->ps_inv_multiplier = 0; } else { |