*** empty log message ***
[m17n/m17n-pango.git] / m17n-fc.c
index 8e06fc3..9989d18 100644 (file)
--- a/m17n-fc.c
+++ b/m17n-fc.c
@@ -1,7 +1,7 @@
 /* Pango
  * m17n-fc.c: Generic shaper using the m17n library for FreeType-based backends
 
-   Copyright (C) 2004, 2005, 2006, 2007
+   Copyright (C) 2004, 2005, 2006, 2007, 2008
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H16PRO276
 
@@ -212,10 +212,14 @@ otf_check_features (PangoOTInfo *ot_info, PangoOTTableType type,
   langsys_tag = spec->langsys;
   if (! langsys_tag)
     langsys_tag = PANGO_OT_DEFAULT_LANGUAGE;
-  pango_ot_info_find_language (ot_info, type, script_idx,
-                              langsys_tag, &langsys_idx, &index);
+  if (! pango_ot_info_find_language (ot_info, type, script_idx,
+                                    langsys_tag, &langsys_idx, &index))
+    {
+      langsys_idx = PANGO_OT_DEFAULT_LANGUAGE;
+      index = 0xFFFF;
+    }
 
-  if (index != 0xFFFF)
+  if (info && index != 0xFFFF)
     {
       info->ruleset[for_gpos] = pango_ot_ruleset_new (ot_info);
       pango_ot_ruleset_add_feature (info->ruleset[for_gpos], type,