projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a89f08
)
svga: add NULL pointer check in svga_create_sampler_state()
author
Brian Paul
<brianp@vmware.com>
Thu, 24 Jan 2013 23:53:33 +0000
(16:53 -0700)
committer
Brian Paul
<brianp@vmware.com>
Fri, 25 Jan 2013 22:41:41 +0000
(15:41 -0700)
Note: This is a candidate for the 9.0 branch.
src/gallium/drivers/svga/svga_pipe_sampler.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/svga/svga_pipe_sampler.c
b/src/gallium/drivers/svga/svga_pipe_sampler.c
index 0d2745e25eff9ed3e649699bec0e912bb2464c0c..03d604d97c5bd33f32841e2816734dcc9b754cef 100644
(file)
--- a/
src/gallium/drivers/svga/svga_pipe_sampler.c
+++ b/
src/gallium/drivers/svga/svga_pipe_sampler.c
@@
-98,6
+98,9
@@
svga_create_sampler_state(struct pipe_context *pipe,
struct svga_context *svga = svga_context(pipe);
struct svga_sampler_state *cso = CALLOC_STRUCT( svga_sampler_state );
+ if (!cso)
+ return NULL;
+
cso->mipfilter = translate_mip_filter(sampler->min_mip_filter);
cso->magfilter = translate_img_filter( sampler->mag_img_filter );
cso->minfilter = translate_img_filter( sampler->min_img_filter );