[graphite2] Don't crash if language is not set
https://bugs.webkit.org/show_bug.cgi?id=113796
This commit is contained in:
parent
a88a62f70f
commit
7148dc1a97
|
@ -226,7 +226,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
|
|||
gr_font *grfont = HB_SHAPER_DATA_GET (font);
|
||||
|
||||
const char *lang = hb_language_to_string (hb_buffer_get_language (buffer));
|
||||
const char *lang_end = strchr (lang, '-');
|
||||
const char *lang_end = lang ? strchr (lang, '-') : NULL;
|
||||
int lang_len = lang_end ? lang_end - lang : -1;
|
||||
gr_feature_val *feats = gr_face_featureval_for_lang (grface, lang ? hb_tag_from_string (lang, lang_len) : 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue