bug 739858 - don't try to actually load a font if the proxy has been detached from its family. r=jdaggett

This commit is contained in:
Jonathan Kew 2012-04-26 18:48:05 +01:00
Родитель 6a0b9721d8
Коммит b814bf5c6d
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -622,6 +622,14 @@ gfxFontEntry*
gfxUserFontSet::LoadFont(gfxProxyFontEntry *aProxy,
const PRUint8 *aFontData, PRUint32 &aLength)
{
// if the proxy doesn't belong to a family, we just bail as it won't be
// accessible/usable anyhow (maybe the font set got modified right as
// the load was completing?)
if (!aProxy->Family()) {
NS_Free(aFontData);
return nsnull;
}
gfxFontEntry *fe = nsnull;
gfxUserFontType fontType =