mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
u_blitter: Move a pointer dereference after null check.
Fixes dereference before null check defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Marek Olšák <maraeo@gmail.com>
This commit is contained in:
parent
fb85558ab1
commit
9d36b3abfd
1 changed files with 3 additions and 2 deletions
|
|
@ -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? */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue