projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a88a62f
)
[graphite2] Don't crash if language is not set
author
Behdad Esfahbod
<behdad@behdad.org>
Tue, 2 Apr 2013 18:08:53 +0000
(14:08 -0400)
committer
Behdad Esfahbod
<behdad@behdad.org>
Tue, 2 Apr 2013 18:08:53 +0000
(14:08 -0400)
https://bugs.webkit.org/show_bug.cgi?id=113796
src/hb-graphite2.cc
patch
|
blob
|
history
diff --git
a/src/hb-graphite2.cc
b/src/hb-graphite2.cc
index
16ef9a4
..
cce8606
100644
(file)
--- a/
src/hb-graphite2.cc
+++ b/
src/hb-graphite2.cc
@@
-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);