use safeunref on typefaces, since Deserialize might return NULL.
git-svn-id: http://skia.googlecode.com/svn/trunk@1969 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
c9493a4a68
commit
90751c5788
@ -410,7 +410,7 @@ SkPicturePlayback::SkPicturePlayback(SkStream* stream) {
|
||||
int typefaceCount = readTagSize(stream, PICT_TYPEFACE_TAG);
|
||||
fTFPlayback.setCount(typefaceCount);
|
||||
for (i = 0; i < typefaceCount; i++) {
|
||||
fTFPlayback.set(i, SkTypeface::Deserialize(stream))->unref();
|
||||
SkSafeUnref(fTFPlayback.set(i, SkTypeface::Deserialize(stream)));
|
||||
}
|
||||
|
||||
fPictureCount = readTagSize(stream, PICT_PICTURE_TAG);
|
||||
|
Loading…
Reference in New Issue
Block a user