mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 10:00:22 +01:00
draw: Add a null check for draw.
There is an earlier null check for draw so draw could be null here as well. Fixes "Dereference after null check" defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
9b388c66fc
commit
505a6de7fc
1 changed files with 1 additions and 1 deletions
|
|
@ -237,7 +237,7 @@ draw_unfilled_prepare_outputs( struct draw_context *draw,
|
|||
boolean is_unfilled = (rast &&
|
||||
(rast->fill_front != PIPE_POLYGON_MODE_FILL ||
|
||||
rast->fill_back != PIPE_POLYGON_MODE_FILL));
|
||||
const struct draw_fragment_shader *fs = draw->fs.fragment_shader;
|
||||
const struct draw_fragment_shader *fs = draw ? draw->fs.fragment_shader : 0;
|
||||
|
||||
if (is_unfilled && fs && fs->info.uses_frontface) {
|
||||
unfilled->face_slot = draw_alloc_extra_vertex_attrib(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue