From 039ec98ac1250873560870a13643254b183620a0 Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Fri, 30 Oct 2009 16:41:13 -0600 Subject: [PATCH] Bug 524462. Fix startup crash in pref fonts with funky cmaps. r=jdaggett --- gfx/thebes/src/gfxWindowsFonts.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/thebes/src/gfxWindowsFonts.cpp b/gfx/thebes/src/gfxWindowsFonts.cpp index a20f83ecb89..9b6938ec9fc 100644 --- a/gfx/thebes/src/gfxWindowsFonts.cpp +++ b/gfx/thebes/src/gfxWindowsFonts.cpp @@ -1323,7 +1323,9 @@ gfxWindowsFontGroup::FamilyListToArrayList(const nsString& aFamilies, for (PRUint32 i = 0; i < len; ++i) { const nsString& str = fonts[i]; nsRefPtr fe = gfxWindowsPlatform::GetPlatform()->FindFontEntry(str, mStyle); - list->AppendElement(fe); + if (fe) { + list->AppendElement(fe); + } } }