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:
Nikolay Sivov 2016-02-08 12:31:46 +03:00 committed by Alexandre Julliard
parent 8a4db9fd90
commit 15485f538d
1 changed files with 4 additions and 4 deletions

View File

@ -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,