From 65bc81d239463649ce8378356da4565bd01c36d1 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Fri, 23 Apr 2021 15:00:21 +0300 Subject: [PATCH] [libvpx] scan-build: fix false-positive dereference of null pointer --- libs/libvpx/vp8/encoder/pickinter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/libvpx/vp8/encoder/pickinter.c b/libs/libvpx/vp8/encoder/pickinter.c index dc72eed88c..6f8a173582 100644 --- a/libs/libvpx/vp8/encoder/pickinter.c +++ b/libs/libvpx/vp8/encoder/pickinter.c @@ -631,16 +631,16 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, } #endif assert(plane[LAST_FRAME][0] != NULL); - dot_artifact_candidate = check_dot_artifact_candidate( + if (plane[LAST_FRAME][0]) dot_artifact_candidate = check_dot_artifact_candidate( cpi, x, target_y, stride, plane[LAST_FRAME][0], mb_row, mb_col, 0); // If not found in Y channel, check UV channel. if (!dot_artifact_candidate) { assert(plane[LAST_FRAME][1] != NULL); - dot_artifact_candidate = check_dot_artifact_candidate( + if (plane[LAST_FRAME][1]) dot_artifact_candidate = check_dot_artifact_candidate( cpi, x, target_u, stride_uv, plane[LAST_FRAME][1], mb_row, mb_col, 1); if (!dot_artifact_candidate) { assert(plane[LAST_FRAME][2] != NULL); - dot_artifact_candidate = check_dot_artifact_candidate( + if (plane[LAST_FRAME][2]) dot_artifact_candidate = check_dot_artifact_candidate( cpi, x, target_v, stride_uv, plane[LAST_FRAME][2], mb_row, mb_col, 2); }