Gfx: Minor fix

This commit is contained in:
Birunthan Mohanathas 2013-05-05 13:21:30 +03:00
parent 67542f31dd
commit e10cdd2a86

View File

@ -159,10 +159,19 @@ HRESULT GetGDIFamilyNameFromDWriteFont(IDWriteFont* font, WCHAR* buffer, UINT bu
BOOL stringsExist; BOOL stringsExist;
HRESULT hr = font->GetInformationalStrings( HRESULT hr = font->GetInformationalStrings(
DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &stringsExist); DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &stringsExist);
if (SUCCEEDED(hr) && stringsExist) if (SUCCEEDED(hr))
{
if (stringsExist)
{ {
hr = strings->GetString(0, buffer, bufferSize); hr = strings->GetString(0, buffer, bufferSize);
} }
else
{
hr = E_FAIL;
}
strings->Release();
}
return hr; return hr;
} }