Fixing valgrind error
After an error in the stream prevented the deserialization of SkRect members, there was no check to see if there was an error state before testing the validity of these uninitialized SkRect members. Added the check to fix the valgrind error. BUG= R=robertphillips@google.com, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/114493005 git-svn-id: http://skia.googlecode.com/svn/trunk@12727 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
d6c1d58763
commit
658e1b38b9
@ -31,7 +31,7 @@ SkBitmapSource::SkBitmapSource(SkFlattenableReadBuffer& buffer)
|
||||
fBitmap.unflatten(buffer);
|
||||
buffer.readRect(&fSrcRect);
|
||||
buffer.readRect(&fDstRect);
|
||||
buffer.validate(SkIsValidRect(fSrcRect) && SkIsValidRect(fDstRect));
|
||||
buffer.validate(buffer.isValid() && SkIsValidRect(fSrcRect) && SkIsValidRect(fDstRect));
|
||||
}
|
||||
|
||||
void SkBitmapSource::flatten(SkFlattenableWriteBuffer& buffer) const {
|
||||
|
Loading…
Reference in New Issue
Block a user