Reviewed by Dave Hyatt.
[WebKit-https.git] / WebCore / platform / graphics / win / FontCacheWin.cpp
index 84735e58fa728346c88e83b9ea7f1be5a2a28ab6..c7381dac27432a7ad8e2ba16b650266629cac38c 100644 (file)
@@ -101,7 +101,7 @@ const FontData* FontCache::getFontDataForCharacters(const Font& font, const UCha
         const UINT simplifiedChineseCP = 936;
         UINT codePage;
         HFONT result;
-        if (SUCCEEDED(langFontLink->CodePagesToCodePage(actualCodePages, simplifiedChineseCP, &codePage)) && codePage == simplifiedChineseCP) {
+        if (actualCodePages && SUCCEEDED(langFontLink->CodePagesToCodePage(actualCodePages, simplifiedChineseCP, &codePage)) && codePage == simplifiedChineseCP) {
             DWORD simplifiedChineseCodePages;
             langFontLink->CodePageToCodePages(simplifiedChineseCP, &simplifiedChineseCodePages);
             langFontLink->MapFont(hdc, simplifiedChineseCodePages, characters[0], &result);