Bug 393819 Assertion: What's this case?: 'result == 0 || result == 1' in gfxFontconfigUtils when different fonts have a common family name. patch by Karl Tomlinson <mozbugz@karlt.net> r+a=pavlov

This commit is contained in:
masayuki@d-toybox.com 2007-08-30 23:30:59 -07:00
Родитель c4f39399a6
Коммит ec20876c3e
1 изменённых файлов: 6 добавлений и 5 удалений

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

@ -445,13 +445,14 @@ gfxFontconfigUtils::IsExistingFont(const nsACString &aFontName)
if (!fs)
goto end;
result = fs->nfont;
NS_ASSERTION(result == 0 || result == 1, "What's this case?");
if (result > 0)
// There can be more than one matching set of family names: see bug 393819.
if (fs->nfont > 0) {
mAliasForSingleFont.AppendCString(aFontName);
else
result = 1;
} else {
mNonExistingFonts.AppendCString(aFontName);
result = 0;
}
end:
if (pat)