Commit 45538716 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

usp10: Check if corresponding headers are present before accessing their feature…

usp10: Check if corresponding headers are present before accessing their feature lists in _initialize_feature_cache. Based on feedback from Henri, fixes regression from commit 63bcfa33. Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAric Stewart <aric@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 92651b98
......@@ -2832,13 +2832,17 @@ static void _initialize_feature_cache(ScriptCache *psc, LoadedLanguage *language
if (language->features_initialized)
return;
feature_list = (const OT_FeatureList *)((const BYTE *)gsub_header + GET_BE_WORD(gsub_header->FeatureList));
if ((lang = language->gsub_table))
{
feature_list = (const OT_FeatureList *)((const BYTE *)gsub_header + GET_BE_WORD(gsub_header->FeatureList));
usp10_language_add_feature_list(language, FEATURE_GSUB_TABLE, lang, feature_list);
}
feature_list = (const OT_FeatureList *)((const BYTE *)gpos_header + GET_BE_WORD(gpos_header->FeatureList));
if ((lang = language->gpos_table))
{
feature_list = (const OT_FeatureList *)((const BYTE *)gpos_header + GET_BE_WORD(gpos_header->FeatureList));
usp10_language_add_feature_list(language, FEATURE_GPOS_TABLE, lang, feature_list);
}
language->features_initialized = TRUE;
}
......
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