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>
This commit is contained in:
Mike Klein 2016-12-06 10:36:52 -05:00
parent cc63173634
commit ebe79ffd86

View File

@ -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 {