diff options
author | Brian Paul <[email protected]> | 2016-04-05 09:56:49 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-04-07 11:42:43 -0600 |
commit | 9f443af449515240169e69b98bdb3746f38e7f35 (patch) | |
tree | 567451e27c63154d471ec2bf657033b81544b345 /src/gallium/drivers/svga/svga_pipe_blend.c | |
parent | 60cf2fa477c1a91c1f8daea14d14edca80f1e183 (diff) |
svga: add some trivial null pointer checks
These small mallocs will probably never fail, but static analysis tools
may complain about the missing checks.
Reviewed-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_pipe_blend.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_pipe_blend.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_blend.c b/src/gallium/drivers/svga/svga_pipe_blend.c index 0af80cd4296..0ba9313fd5e 100644 --- a/src/gallium/drivers/svga/svga_pipe_blend.c +++ b/src/gallium/drivers/svga/svga_pipe_blend.c @@ -142,6 +142,9 @@ svga_create_blend_state(struct pipe_context *pipe, struct svga_blend_state *blend = CALLOC_STRUCT( svga_blend_state ); unsigned i; + if (!blend) + return NULL; + /* Fill in the per-rendertarget blend state. We currently only * support independent blend enable and colormask per render target. */ |