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-31 06:30:59 +00:00
Родитель 82f58cf040
Коммит aa9cb89e58
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)