dwrite: Check GetGdiCompatibleMetrics() return value (Coverity).

This commit is contained in:
Nikolay Sivov 2015-07-12 23:35:10 +03:00 committed by Alexandre Julliard
parent 66efbbbae2
commit cf5d9848d8
2 changed files with 9 additions and 3 deletions

View File

@ -1090,7 +1090,12 @@ static HRESULT WINAPI dwritetextanalyzer_GetGdiCompatibleGlyphPlacements(IDWrite
return hr;
}
IDWriteFontFace_GetGdiCompatibleMetrics(fontface, emSize, pixels_per_dip, transform, &metrics);
hr = IDWriteFontFace_GetGdiCompatibleMetrics(fontface, emSize, pixels_per_dip, transform, &metrics);
if (FAILED(hr)) {
IDWriteFontFace1_Release(fontface1);
WARN("failed to get compat metrics, 0x%08x\n", hr);
return hr;
}
for (i = 0; i < glyph_count; i++) {
INT32 a;

View File

@ -828,12 +828,13 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout)
/* baseline derived from font metrics */
if (layout->gdicompatible) {
/* FIXME: check return value when it's actually implemented */
IDWriteFontFace_GetGdiCompatibleMetrics(run->run.fontFace,
hr = IDWriteFontFace_GetGdiCompatibleMetrics(run->run.fontFace,
run->run.fontEmSize,
layout->pixels_per_dip,
&layout->transform,
&fontmetrics);
if (FAILED(hr))
WARN("failed to get compat metrics, 0x%08x\n", hr);
}
else
IDWriteFontFace_GetMetrics(run->run.fontFace, &fontmetrics);