dwrite: Handle font data initialization failure when building collections.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
dcf914857c
commit
7276d5fac1
|
@ -387,7 +387,8 @@ static void release_font_data(struct dwrite_font_data *data)
|
|||
if (data->info_strings[i])
|
||||
IDWriteLocalizedStrings_Release(data->info_strings[i]);
|
||||
}
|
||||
IDWriteLocalizedStrings_Release(data->names);
|
||||
if (data->names)
|
||||
IDWriteLocalizedStrings_Release(data->names);
|
||||
|
||||
IDWriteFontFile_Release(data->file);
|
||||
IDWriteFactory2_Release(data->factory);
|
||||
|
@ -3147,8 +3148,11 @@ HRESULT create_font_collection(IDWriteFactory2* factory, IDWriteFontFileEnumerat
|
|||
|
||||
/* alloc and init new font data structure */
|
||||
hr = init_font_data(factory, file, face_type, i, &family_name, &font_data);
|
||||
if (FAILED(hr))
|
||||
if (FAILED(hr)) {
|
||||
/* move to next one */
|
||||
hr = S_OK;
|
||||
continue;
|
||||
}
|
||||
|
||||
fontstrings_get_en_string(family_name, familyW, sizeof(familyW)/sizeof(WCHAR));
|
||||
|
||||
|
|
Loading…
Reference in New Issue