From 3996f5b77cebc8ae59dc185b1ad062e6b12a0270 Mon Sep 17 00:00:00 2001 From: cyreve Date: Fri, 10 Feb 2006 20:41:45 +0000 Subject: [PATCH] bug 1412947: crash with some (non-truetype?) fonts --- src/libnrtype/FontInstance.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libnrtype/FontInstance.cpp b/src/libnrtype/FontInstance.cpp index d2b19d0f2..190bbb19f 100644 --- a/src/libnrtype/FontInstance.cpp +++ b/src/libnrtype/FontInstance.cpp @@ -349,7 +349,8 @@ void font_instance::InitTheFace() SelectObject(daddy->hScreenDC,theFace); #else theFace=pango_ft2_font_get_face(pFont); - FT_Select_Charmap(theFace,ft_encoding_unicode) && FT_Select_Charmap(theFace,ft_encoding_symbol); + if ( theFace ) + FT_Select_Charmap(theFace,ft_encoding_unicode) && FT_Select_Charmap(theFace,ft_encoding_symbol); #endif } -- 2.30.2