Fix scan_build warnings in temporal_filter_test.cc
authorAngie Chiang <angiebird@google.com>
Mon, 19 Nov 2018 22:32:54 +0000 (14:32 -0800)
committerAngie Chiang <angiebird@google.com>
Tue, 20 Nov 2018 22:55:52 +0000 (14:55 -0800)
BUG=webm:1575

Change-Id: I4f4236305ebd932515451b1306211154b34678de

test/temporal_filter_test.cc

index 655a36b..b01f8ad 100644 (file)
@@ -45,6 +45,11 @@ void reference_filter(const Buffer<uint8_t> &a, const Buffer<uint8_t> &b, int w,
     rounding = 1 << (filter_strength - 1);
   }
 
+  if (a.TopLeftPixel() == NULL || b.TopLeftPixel() == NULL ||
+      diff_sq.TopLeftPixel() == NULL) {
+    assert(0);
+    return;
+  }
   // Calculate all the differences. Avoids re-calculating a bunch of extra
   // values.
   for (int height = 0; height < h; ++height) {