Module: Mesa Branch: master Commit: b03f3945080971004f2ba0952ea13d7be4bf3c43 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b03f3945080971004f2ba0952ea13d7be4bf3c43
Author: Brian Paul <bri...@vmware.com> Date: Fri Jun 21 16:09:05 2013 -0600 svga: add null ptr check in svga_get_tex_sampler_view() Trivial. --- 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 _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit