Bug 1505966 - Bail out of using DWrite fonts if we failed to get the system collection. r=lsalzman

This commit is contained in:
Jonathan Kew 2018-11-09 09:11:14 +00:00
parent 2d73be3784
commit b250a10034

View File

@ -1072,7 +1072,7 @@ gfxDWriteFontList::InitFontListForPlatform()
mSystemFonts = Factory::GetDWriteSystemFonts(true);
NS_ASSERTION(mSystemFonts != nullptr, "GetSystemFontCollection failed!");
if (FAILED(hr)) {
if (!mSystemFonts) {
Telemetry::Accumulate(Telemetry::DWRITEFONT_INIT_PROBLEM,
uint32_t(errSystemFontCollection));
return NS_ERROR_FAILURE;