Reviewed-by: Marek Olšák <[email protected]> Marek
On Fri, Aug 3, 2012 at 8:35 AM, Vinson Lee <[email protected]> wrote: > Fixes dereference before null check defect reported by Coverity. > > Signed-off-by: Vinson Lee <[email protected]> > --- > src/gallium/auxiliary/util/u_blitter.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/gallium/auxiliary/util/u_blitter.c > b/src/gallium/auxiliary/util/u_blitter.c > index b31ac2d..22a828f 100644 > --- a/src/gallium/auxiliary/util/u_blitter.c > +++ b/src/gallium/auxiliary/util/u_blitter.c > @@ -941,14 +941,15 @@ void util_blitter_copy_texture(struct blitter_context > *blitter, > struct pipe_sampler_view src_templ, *src_view; > unsigned bind; > boolean is_stencil, is_depth; > - const struct util_format_description *src_desc = > - util_format_description(src->format); > + const struct util_format_description *src_desc; > > /* Give up if textures are not set. */ > assert(dst && src); > if (!dst || !src) > return; > > + src_desc = util_format_description(src->format); > + > assert(src->target < PIPE_MAX_TEXTURE_TYPES); > > /* Is this a ZS format? */ > -- > 1.7.11.1 > > _______________________________________________ > mesa-dev mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
