v3dv: avoid dereferencing null value

Fixes CID#1468079 "Dereference null return value (NULL_RETURNS)"

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10280>
This commit is contained in:
Juan A. Suarez Romero 2021-04-16 10:21:20 +02:00 committed by Marge Bot
parent 86d903e88d
commit d29b5b9f20
1 changed files with 3 additions and 0 deletions

View File

@ -1516,6 +1516,9 @@ emit_tlb_clear(struct v3dv_cmd_buffer *cmd_buffer,
v3dv_cmd_buffer_start_job(cmd_buffer, cmd_buffer->state.subpass_idx,
V3DV_JOB_TYPE_GPU_CL);
if (!job)
return;
/* vkCmdClearAttachments runs inside a render pass */
job->is_subpass_continue = true;