dwrite: Actually return NULL names pointer and error code when failed to read them.

This commit is contained in:
Nikolay Sivov 2015-03-13 21:24:49 +03:00 committed by Alexandre Julliard
parent a19febc1a7
commit 5eccb1322d
1 changed files with 2 additions and 2 deletions

View File

@ -773,7 +773,7 @@ HRESULT get_family_names_from_stream(IDWriteFontFileStream *stream, UINT32 index
{
const void *name_table = NULL;
void *name_context;
HRESULT hr = S_OK;
HRESULT hr = E_FAIL;
opentype_get_font_table(stream, facetype, index, MS_NAME_TAG, &name_table, &name_context, NULL, NULL);
if (name_table) {
@ -781,7 +781,7 @@ HRESULT get_family_names_from_stream(IDWriteFontFileStream *stream, UINT32 index
IDWriteFontFileStream_ReleaseFileFragment(stream, name_context);
}
else
names = NULL;
*names = NULL;
return hr;
}