Bug 1152023 - Null check root frame when marking frames dirty in response to a user font load. r=jdaggett

This commit is contained in:
Cameron McCormack 2015-04-08 13:01:38 +10:00
Родитель bab336bd5b
Коммит 895c5552ec
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -2184,7 +2184,10 @@ nsPresContext::UserFontSetUpdated(gfxUserFontEntry* aUpdatedFont)
// it contains that specific font (i.e. the one chosen within the family
// given the weight, width, and slant from the nsStyleFont). If it does,
// mark that frame dirty and skip inspecting its descendants.
nsFontFaceUtils::MarkDirtyForFontChange(mShell->GetRootFrame(), aUpdatedFont);
nsIFrame* root = mShell->GetRootFrame();
if (root) {
nsFontFaceUtils::MarkDirtyForFontChange(root, aUpdatedFont);
}
}
FontFaceSet*