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)
|
if (FAILED(hr) || !exists)
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
IDWriteLocalizedStrings_FindLocaleName(name, enusW, &index, &exists);
|
hr = IDWriteLocalizedStrings_FindLocaleName(name, enusW, &index, &exists);
|
||||||
IDWriteLocalizedStrings_GetString(name, index, logfont->lfFaceName, sizeof(logfont->lfFaceName)/sizeof(WCHAR));
|
if (hr == S_OK)
|
||||||
|
hr = IDWriteLocalizedStrings_GetString(name, index, logfont->lfFaceName, sizeof(logfont->lfFaceName)/sizeof(WCHAR));
|
||||||
IDWriteLocalizedStrings_Release(name);
|
IDWriteLocalizedStrings_Release(name);
|
||||||
|
return hr;
|
||||||
return S_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI gdiinterop_ConvertFontFaceToLOGFONT(IDWriteGdiInterop *iface,
|
static HRESULT WINAPI gdiinterop_ConvertFontFaceToLOGFONT(IDWriteGdiInterop *iface,
|
||||||
|
|
Loading…
Reference in New Issue