svga: add null ptr check in svga_get_tex_sampler_view()

Trivial.
This commit is contained in:
Brian Paul 2013-06-21 16:09:05 -06:00
parent 67bfdea933
commit b03f394508
1 changed files with 3 additions and 0 deletions

View File

@ -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