diff options
Diffstat (limited to 'WebCore/platform/graphics/cairo/FontCacheCairo.cpp')
-rw-r--r-- | WebCore/platform/graphics/cairo/FontCacheCairo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/cairo/FontCacheCairo.cpp b/WebCore/platform/graphics/cairo/FontCacheCairo.cpp index d2b2f39..79b32b4 100644 --- a/WebCore/platform/graphics/cairo/FontCacheCairo.cpp +++ b/WebCore/platform/graphics/cairo/FontCacheCairo.cpp @@ -39,6 +39,11 @@ const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font, cons FcResult fresult; FontPlatformData* prim = const_cast<FontPlatformData*>(&font.primaryFont()->platformData()); + // FIXME: This should not happen, apparently. We are null-checking + // for now just to avoid crashing. + if (!prim || !prim->m_pattern) + return 0; + if (!prim->m_fallbacks) prim->m_fallbacks = FcFontSort(NULL, prim->m_pattern, FcTrue, NULL, &fresult); |