mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
svga: add NULL pointer check in svga_create_sampler_state()
Note: This is a candidate for the 9.0 branch.
(cherry picked from commit 9227c53741)
This commit is contained in:
parent
998f402af5
commit
6b745a4e24
1 changed files with 3 additions and 0 deletions
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue