#74899 Mozilla crashes in GKGFXWIN.DLL when changing font for a specific encodin

g from Prefs
r=nhotta, sr=waterson
When freeing global stuff, after cmaps are freed, globalFont should do it too.
This commit is contained in:
shanjian%netscape.com 2001-05-13 01:05:06 +00:00
Родитель 93222981bf
Коммит 0b421a6a2c
1 изменённых файлов: 10 добавлений и 0 удалений

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

@ -187,6 +187,16 @@ FreeGlobals(void)
}
nsFontMetricsWin::gFontMaps = nsnull;
gInitializedFontMaps = 0;
if (nsFontMetricsWin::gGlobalFonts) {
//while all cmap is freed, gGlobalFonts's pointer should be freed too.
for (int i = 0; i < nsFontMetricsWin::gGlobalFontsCount; i++) {
delete nsFontMetricsWin::gGlobalFonts[i].name;
}
PR_Free(nsFontMetricsWin::gGlobalFonts);
nsFontMetricsWin::gGlobalFonts = nsnull;
gGlobalFontsAlloc = 0;
nsFontMetricsWin::gGlobalFontsCount = 0;
}
}
// free FamilyNames