diff options
author | Brian Paul <brianp@vmware.com> | 2013-06-21 16:09:05 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2013-06-22 08:49:09 -0600 |
commit | b03f3945080971004f2ba0952ea13d7be4bf3c43 (patch) | |
tree | 1dcec8f710b0a3ee871ad2c8e01f94f5d5a308fb /src/gallium | |
parent | 67bfdea933089a4ce377a95ddb5e0a4089bfa0fa (diff) | |
download | external_mesa3d-b03f3945080971004f2ba0952ea13d7be4bf3c43.zip external_mesa3d-b03f3945080971004f2ba0952ea13d7be4bf3c43.tar.gz external_mesa3d-b03f3945080971004f2ba0952ea13d7be4bf3c43.tar.bz2 |
svga: add null ptr check in svga_get_tex_sampler_view()
Trivial.
Diffstat (limited to 'src/gallium')
-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 efbc138..1950784 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 |