From b03f3945080971004f2ba0952ea13d7be4bf3c43 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 21 Jun 2013 16:09:05 -0600 Subject: [PATCH] svga: add null ptr check in svga_get_tex_sampler_view() Trivial. --- src/gallium/drivers/svga/svga_sampler_view.c | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.7.4