dwrite: Improve error handling in ConvertFontToLOGFONT() (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8a4db9fd90
commit
15485f538d
|
@ -711,11 +711,11 @@ static HRESULT WINAPI gdiinterop_ConvertFontToLOGFONT(IDWriteGdiInterop *iface,
|
|||
if (FAILED(hr) || !exists)
|
||||
return hr;
|
||||
|
||||
IDWriteLocalizedStrings_FindLocaleName(name, enusW, &index, &exists);
|
||||
IDWriteLocalizedStrings_GetString(name, index, logfont->lfFaceName, sizeof(logfont->lfFaceName)/sizeof(WCHAR));
|
||||
hr = IDWriteLocalizedStrings_FindLocaleName(name, enusW, &index, &exists);
|
||||
if (hr == S_OK)
|
||||
hr = IDWriteLocalizedStrings_GetString(name, index, logfont->lfFaceName, sizeof(logfont->lfFaceName)/sizeof(WCHAR));
|
||||
IDWriteLocalizedStrings_Release(name);
|
||||
|
||||
return S_OK;
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI gdiinterop_ConvertFontFaceToLOGFONT(IDWriteGdiInterop *iface,
|
||||
|
|
Loading…
Reference in New Issue