Commit cf5d9848 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

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

parent 66efbbba
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment