dwrite: Do not segfault when there are no typographic features to return.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 65f5033702
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
087637e861
commit
4b774ec357
|
@ -336,6 +336,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);
|
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);
|
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. */
|
/* Sort and remove duplicates. */
|
||||||
qsort(t.tags, t.count, sizeof(*t.tags), tag_array_sorting_compare);
|
qsort(t.tags, t.count, sizeof(*t.tags), tag_array_sorting_compare);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue