projects
/
platform
/
upstream
/
libSkiaSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3767cd6
)
SkAdvancedTypefaceMetrics: fail cleanly.
author
halcanary
<halcanary@google.com>
Fri, 6 May 2016 15:45:46 +0000
(08:45 -0700)
committer
Commit bot
<commit-bot@chromium.org>
Fri, 6 May 2016 15:45:46 +0000
(08:45 -0700)
BUG=567031
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1956753002
Review-Url: https://codereview.chromium.org/
1956753002
src/core/SkAdvancedTypefaceMetrics.cpp
patch
|
blob
|
history
diff --git
a/src/core/SkAdvancedTypefaceMetrics.cpp
b/src/core/SkAdvancedTypefaceMetrics.cpp
index
318f4a0
..
0e9ba95
100644
(file)
--- a/
src/core/SkAdvancedTypefaceMetrics.cpp
+++ b/
src/core/SkAdvancedTypefaceMetrics.cpp
@@
-257,6
+257,9
@@
SkAdvancedTypefaceMetrics::AdvanceMetric<Data>* getAdvanceData(
}
if (curRange->fStartId == lastIndex) {
SkASSERT(prevRange);
+ if (!prevRange) {
+ return nullptr; // https://crbug.com/567031
+ }
SkASSERT(prevRange->fNext->fStartId == lastIndex);
prevRange->fNext.reset();
} else {