Index: src/fonts/SkTestScalerContext.cpp |
diff --git a/src/fonts/SkTestScalerContext.cpp b/src/fonts/SkTestScalerContext.cpp |
index a2748564a56cca6722d165c3fb224fee80712eb9..ebe2ee1c52679c22fe8e3807c62ca5e27e1503ad 100644 |
--- a/src/fonts/SkTestScalerContext.cpp |
+++ b/src/fonts/SkTestScalerContext.cpp |
@@ -20,7 +20,7 @@ |
SkTestFont::SkTestFont(const SkTestFontData& fontData) |
: INHERITED() |
, fCharCodes(fontData.fCharCodes) |
- , fCharCodesCount(fontData.fCharCodesCount) |
+ , fCharCodesCount(fontData.fCharCodes ? fontData.fCharCodesCount : 0) |
, fWidths(fontData.fWidths) |
, fMetrics(fontData.fMetrics) |
, fName(fontData.fName) |