Don't fail when language is not set

This commit is contained in:
Ebrahim Byagowi 2016-03-30 20:21:40 +00:00
parent 1c00a46c7a
commit d691ba3f40
1 changed files with 6 additions and 3 deletions

View File

@ -689,8 +689,11 @@ _hb_directwrite_shape(hb_shape_plan_t *shape_plan,
bool backward = HB_DIRECTION_IS_BACKWARD(buffer->props.direction);
wchar_t lang[4];
wchar_t lang[4] = {0};
if (buffer->props.language != NULL) {
mbstowcs(lang, hb_language_to_string(buffer->props.language), 4);
}
hr = analyzer->GetGlyphs(pchars, length,
fontFace, FALSE,
buffer->props.direction,