diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-09 22:02:35 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-09 22:02:35 +0000 |
commit | 3a886ccf2a49757dba4e4cba8400bb9624112ec5 (patch) | |
tree | 7d6abd57ea1dfc8288e1e9069388b313294417c1 | |
parent | 14451703f1a53d0ff14ffe4f44436526383a5fd4 (diff) |
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
-rw-r--r-- | src/core/SkScalerContext.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index a7e2432cc1..1f71bf0885 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -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 } |