Bug 1067343 - Check that mAvailableFonts[i] is non-null before trying to use it. r=jdaggett

This commit is contained in:
Jonathan Kew 2014-09-18 10:48:00 +01:00
parent c21d3386f6
commit dcf285b64a

View File

@ -1303,7 +1303,7 @@ gfxFontFamily::ContainsFace(gfxFontEntry* aFontEntry) {
return true;
}
// userfonts contain the actual real font entry
if (mAvailableFonts[i]->mIsUserFontContainer) {
if (mAvailableFonts[i] && mAvailableFonts[i]->mIsUserFontContainer) {
gfxUserFontEntry* ufe =
static_cast<gfxUserFontEntry*>(mAvailableFonts[i].get());
if (ufe->GetPlatformFontEntry() == aFontEntry) {