Code

crash when we try to rasterise with a font that pango can't cope with
authorcyreve <cyreve@users.sourceforge.net>
Mon, 29 May 2006 20:02:47 +0000 (20:02 +0000)
committercyreve <cyreve@users.sourceforge.net>
Mon, 29 May 2006 20:02:47 +0000 (20:02 +0000)
src/libnrtype/FontFactory.cpp

index b55dc50c2c49b983e259174e1d6de08980a6379c..32f71aed0a2349b08c3a1b65eeef911633c671fe 100644 (file)
@@ -389,8 +389,10 @@ font_instance *font_factory::Face(PangoFontDescription *descr, bool canFail)
             // no match
             if ( canFail ) {
                 PANGO_DEBUG("falling back to Sans\n");
+                descr = pango_font_description_new();
                 pango_font_description_set_family(descr,"Sans");
                 res = Face(descr,false);
+                pango_font_description_free(descr);
             }
         }
     } else {