]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[libvpx] scan-build: fix false-positive dereference of null pointer
authorAndrey Volk <andywolk@gmail.com>
Fri, 23 Apr 2021 12:00:21 +0000 (15:00 +0300)
committerAndrey Volk <andywolk@gmail.com>
Fri, 10 Jul 2026 16:38:46 +0000 (19:38 +0300)
libs/libvpx/vp8/encoder/pickinter.c

index 04f68c32454a3b5377beda0fd2a55b1eda7c0b46..f4316e795d73f81f45c60ee2b4c14c116672bc9b 100644 (file)
@@ -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);
       }