Commit 65f50337 authored by Giovanni Mascellani's avatar Giovanni Mascellani Committed by Alexandre Julliard

dwrite: Do not segfault when there are no typographic features to return.

parent eac1ca61
......@@ -372,6 +372,12 @@ HRESULT shape_get_typographic_features(struct scriptshaping_context *context, co
shape_get_script_lang_index(context, scripts, MS_GPOS_TAG, &script_index, &language_index);
opentype_get_typographic_features(&context->cache->gpos, script_index, language_index, &t);
if (t.count == 0)
{
*actual_tagcount = 0;
return S_OK;
}
/* Sort and remove duplicates. */
qsort(t.tags, t.count, sizeof(*t.tags), tag_array_sorting_compare);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment