diff options
author | Adrienne Walker <enne@chromium.org> | 2017-09-22 10:43:26 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-25 19:24:49 +0000 |
commit | ffbdd022dc6ec372500671b508a3d7ab025727d9 (patch) | |
tree | 1ea1740f4868fd0da31ca6bf2b38a52821130f48 /src | |
parent | 94fddf83816ab846a25134dfc845746187b7733b (diff) |
Make SkPath::readFromMemory failure silent
It currently asserts, but should instead silently fail. Otherwise,
without asserts turned on, this would leave the SkPath in an
inconsistent state.
Bug: chromium: 767770
Change-Id: Ib2af4caccfe19a4a008abccfe7b25b80ccf23146
Reviewed-on: https://skia-review.googlesource.com/50160
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkPath.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index bcf26c0ac5..c3a7c6bed8 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -2183,7 +2183,7 @@ size_t SkPath::readFromMemory(const void* storage, size_t length) { fFirstDirection = SkPathPriv::kCCW_FirstDirection; break; default: - SkASSERT(false); + return 0; } } else { fFirstDirection = dir; |