shithub: libvpx

Download patch

ref: cf6a57692058dc3f1b15668ab613970ed376d2b3
parent: 9a848af54d6921ea9d9a13af96aac270a88a500f
author: Angie Chiang <angiebird@google.com>
date: Mon Nov 19 06:31:25 EST 2018

Fix scan_build_warnings in comp_avg_pred_test.cc

BUG=webm:1575

Change-Id: I9b5f8b08d23fd62ff6400605023f33e3890b0f2d

--- a/test/comp_avg_pred_test.cc
+++ b/test/comp_avg_pred_test.cc
@@ -29,6 +29,11 @@
 
 void reference_pred(const Buffer<uint8_t> &pred, const Buffer<uint8_t> &ref,
                     int width, int height, Buffer<uint8_t> *avg) {
+  if (avg->TopLeftPixel() == NULL || pred.TopLeftPixel() == NULL ||
+      ref.TopLeftPixel() == NULL) {
+    assert(0);
+    return;
+  }
   for (int y = 0; y < height; ++y) {
     for (int x = 0; x < width; ++x) {
       avg->TopLeftPixel()[y * avg->stride() + x] =