Bug 215784 segmentation violation when clicking on Edit/Preferences/Appearance/Fonts

r=dwitte
This commit is contained in:
timeless%mozdev.org 2003-10-16 16:03:55 +00:00
Родитель 6fb084ae36
Коммит c57d871647
1 изменённых файлов: 6 добавлений и 3 удалений

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

@ -627,11 +627,14 @@ static nsresult EnumFonts(const char * aLangGroup, const char* aGeneric, PRUint3
uint32 flags;
if (get_font_family(i, &family, &flags) == B_OK)
{
if (family && FontMatchesGenericType(family, flags, aGeneric, aLangGroup)
&& MatchesLangGroup(family, aLangGroup))
if (family &&
(!aLangGroup ||
FontMatchesGenericType(family, flags, aGeneric, aLangGroup) &&
MatchesLangGroup(family, aLangGroup)))
{
font_name.AssignWithConversion(family);
array[j] = ToNewUnicode(font_name);
if (!(array[j] = ToNewUnicode(font_name)))
break;
++j;
}
}