fix warning/error of uninitialized len

BUG=

Review URL: https://codereview.chromium.org/15001019

git-svn-id: http://skia.googlecode.com/svn/trunk@9084 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2013-05-09 22:02:35 +00:00
parent 14451703f1
commit 3a886ccf2a

View File

@ -113,10 +113,11 @@ SkScalerContext::SkScalerContext(SkTypeface* typeface, const SkDescriptor* desc)
#ifdef SK_BUILD_FOR_ANDROID
uint32_t len;
const void* data = desc->findEntry(kAndroidOpts_SkDescriptorTag, &len);
SkASSERT(data);
SkOrderedReadBuffer buffer(data, len);
fPaintOptionsAndroid.unflatten(buffer);
SkASSERT(buffer.offset() == buffer.size());
if (data) {
SkOrderedReadBuffer buffer(data, len);
fPaintOptionsAndroid.unflatten(buffer);
SkASSERT(buffer.offset() == buffer.size());
}
#endif
}