dwrite: Check GetGdiCompatibleMetrics() return value (Coverity).
This commit is contained in:
parent
66efbbbae2
commit
cf5d9848d8
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue