diff options
author | Brian Paul <[email protected]> | 2013-06-21 16:09:05 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-06-22 08:49:09 -0600 |
commit | b03f3945080971004f2ba0952ea13d7be4bf3c43 (patch) | |
tree | 1dcec8f710b0a3ee871ad2c8e01f94f5d5a308fb | |
parent | 67bfdea933089a4ce377a95ddb5e0a4089bfa0fa (diff) |
svga: add null ptr check in svga_get_tex_sampler_view()
Trivial.
-rw-r--r-- | src/gallium/drivers/svga/svga_sampler_view.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_sampler_view.c b/src/gallium/drivers/svga/svga_sampler_view.c index efbc13899a4..1950784a15a 100644 --- a/src/gallium/drivers/svga/svga_sampler_view.c +++ b/src/gallium/drivers/svga/svga_sampler_view.c @@ -103,6 +103,9 @@ svga_get_tex_sampler_view(struct pipe_context *pipe, } sv = CALLOC_STRUCT(svga_sampler_view); + if (!sv) + return NULL; + pipe_reference_init(&sv->reference, 1); /* Note: we're not refcounting the texture resource here to avoid |