detect (and reject) if radius ia NaN, by using !(radius > 0) instead of (radius <= 0)
git-svn-id: http://skia.googlecode.com/svn/trunk@3007 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
c79fd6ea3f
commit
e582869023
@ -42,7 +42,8 @@ private:
|
||||
SkMaskFilter* SkBlurMaskFilter::Create(SkScalar radius,
|
||||
SkBlurMaskFilter::BlurStyle style,
|
||||
uint32_t flags) {
|
||||
if (radius <= 0 || (unsigned)style >= SkBlurMaskFilter::kBlurStyleCount
|
||||
// use !(radius > 0) instead of radius <= 0 to reject NaN values
|
||||
if (!(radius > 0) || (unsigned)style >= SkBlurMaskFilter::kBlurStyleCount
|
||||
|| flags > SkBlurMaskFilter::kAll_BlurFlag) {
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user