check for bad params sent to discrete patheffect
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1853953002 TBR= Review URL: https://codereview.chromium.org/1853953002
This commit is contained in:
parent
6db0a7bdce
commit
18c00976bd
@ -14,6 +14,12 @@
|
||||
|
||||
sk_sp<SkPathEffect> SkDiscretePathEffect::Make(SkScalar segLength, SkScalar deviation,
|
||||
uint32_t seedAssist) {
|
||||
if (!SkScalarIsFinite(segLength) || !SkScalarIsFinite(deviation)) {
|
||||
return nullptr;
|
||||
}
|
||||
if (segLength <= SK_ScalarNearlyZero) {
|
||||
return nullptr;
|
||||
}
|
||||
return sk_sp<SkPathEffect>(new SkDiscretePathEffect(segLength, deviation, seedAssist));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user