aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2016-12-06 10:36:52 -0500
committerGravatar Mike Klein <mtklein@chromium.org>2016-12-06 15:58:36 +0000
commitebe79ffd8627e3fea945a82895e64cede4ec21bf (patch)
treedc3261666e86de1a572f4e960fe04918d0392c32
parentcc63173634e773eac5de0b92f05d117ed2bdca84 (diff)
fStages.data() should always be defined, but UBSAN says NO
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I6aef3ec2bcb85d6ad4830c759a1234ef2e31f32d Reviewed-on: https://skia-review.googlesource.com/5552 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
-rw-r--r--src/core/SkRasterPipeline.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkRasterPipeline.cpp b/src/core/SkRasterPipeline.cpp
index 6d31a55f28..4c1dbc762e 100644
--- a/src/core/SkRasterPipeline.cpp
+++ b/src/core/SkRasterPipeline.cpp
@@ -20,7 +20,9 @@ void SkRasterPipeline::extend(const SkRasterPipeline& src) {
}
void SkRasterPipeline::run(size_t x, size_t y, size_t n) const {
- SkOpts::run_pipeline(x,y,n, fStages.data(), SkToInt(fStages.size()));
+ if (!fStages.empty()) {
+ SkOpts::run_pipeline(x,y,n, fStages.data(), SkToInt(fStages.size()));
+ }
}
std::function<void(size_t, size_t, size_t)> SkRasterPipeline::compile() const {