aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-01-16 13:11:12 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-16 20:46:18 +0000
commitc183d1642055fb9a6304f2ae9d3e75656fd82b7b (patch)
treeba5ef054835c0925cc9b01afe8b0cacceb0d10da
parentd3b743a4517c83cef6c1c83667373e0d09133b07 (diff)
it is not an error to have no flattenable
Bug:801768 Change-Id: Ib6a0a27a1e6828819879c4b5eef9fe0fd319b225 Reviewed-on: https://skia-review.googlesource.com/94761 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
-rw-r--r--src/core/SkReadBuffer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkReadBuffer.cpp b/src/core/SkReadBuffer.cpp
index 7e4c0fb8a0..8da4089a17 100644
--- a/src/core/SkReadBuffer.cpp
+++ b/src/core/SkReadBuffer.cpp
@@ -379,7 +379,7 @@ SkFlattenable* SkReadBuffer::readFlattenable(SkFlattenable::Type ft) {
// Read the index. We are guaranteed that the first byte
// is zeroed, so we must shift down a byte.
uint32_t index = this->readUInt() >> 8;
- if (!this->validate(index > 0)) {
+ if (index == 0) {
return nullptr; // writer failed to give us the flattenable
}
SkString* namePtr = fFlattenableDict.find(index);