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;
|
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++) {
|
for (i = 0; i < glyph_count; i++) {
|
||||||
INT32 a;
|
INT32 a;
|
||||||
|
|
||||||
|
@ -828,12 +828,13 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout)
|
|||||||
|
|
||||||
/* baseline derived from font metrics */
|
/* baseline derived from font metrics */
|
||||||
if (layout->gdicompatible) {
|
if (layout->gdicompatible) {
|
||||||
/* FIXME: check return value when it's actually implemented */
|
hr = IDWriteFontFace_GetGdiCompatibleMetrics(run->run.fontFace,
|
||||||
IDWriteFontFace_GetGdiCompatibleMetrics(run->run.fontFace,
|
|
||||||
run->run.fontEmSize,
|
run->run.fontEmSize,
|
||||||
layout->pixels_per_dip,
|
layout->pixels_per_dip,
|
||||||
&layout->transform,
|
&layout->transform,
|
||||||
&fontmetrics);
|
&fontmetrics);
|
||||||
|
if (FAILED(hr))
|
||||||
|
WARN("failed to get compat metrics, 0x%08x\n", hr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
IDWriteFontFace_GetMetrics(run->run.fontFace, &fontmetrics);
|
IDWriteFontFace_GetMetrics(run->run.fontFace, &fontmetrics);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user