Handle possibly NULL deref in comparison
Committed on behalf of groby@chromium.org OCL=http://codereview.appspot.com/4633058/ CID=16790,16789 Review URL: http://codereview.appspot.com/4654049 git-svn-id: http://skia.googlecode.com/svn/trunk@1666 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
6aab8e3df7
commit
e03c652478
@ -184,8 +184,10 @@ SkClipStack::B2FIter::B2FIter() {
|
|||||||
bool operator==(const SkClipStack::B2FIter::Clip& a,
|
bool operator==(const SkClipStack::B2FIter::Clip& a,
|
||||||
const SkClipStack::B2FIter::Clip& b) {
|
const SkClipStack::B2FIter::Clip& b) {
|
||||||
return a.fOp == b.fOp &&
|
return a.fOp == b.fOp &&
|
||||||
((a.fRect == NULL && b.fRect == NULL) || *a.fRect == *b.fRect) &&
|
((a.fRect == NULL && b.fRect == NULL) ||
|
||||||
((a.fPath == NULL && b.fPath == NULL) || *a.fPath == *b.fPath);
|
(a.fRect != NULL && b.fRect != NULL && *a.fRect == *b.fRect)) &&
|
||||||
|
((a.fPath == NULL && b.fPath == NULL) ||
|
||||||
|
(a.fPath != NULL && b.fPath != NULL && *a.fPath == *b.fPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator!=(const SkClipStack::B2FIter::Clip& a,
|
bool operator!=(const SkClipStack::B2FIter::Clip& a,
|
||||||
|
Loading…
Reference in New Issue
Block a user