dwrite: Actually return NULL names pointer and error code when failed to read them.
This commit is contained in:
parent
a19febc1a7
commit
5eccb1322d
|
@ -773,7 +773,7 @@ HRESULT get_family_names_from_stream(IDWriteFontFileStream *stream, UINT32 index
|
||||||
{
|
{
|
||||||
const void *name_table = NULL;
|
const void *name_table = NULL;
|
||||||
void *name_context;
|
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);
|
opentype_get_font_table(stream, facetype, index, MS_NAME_TAG, &name_table, &name_context, NULL, NULL);
|
||||||
if (name_table) {
|
if (name_table) {
|
||||||
|
@ -781,7 +781,7 @@ HRESULT get_family_names_from_stream(IDWriteFontFileStream *stream, UINT32 index
|
||||||
IDWriteFontFileStream_ReleaseFileFragment(stream, name_context);
|
IDWriteFontFileStream_ReleaseFileFragment(stream, name_context);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
names = NULL;
|
*names = NULL;
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue