dwrite: Trace QueryInterface fontface calls on failure (Coverity).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2017-04-19 15:15:27 +03:00 committed by Alexandre Julliard
parent 74f6c99621
commit 533d3b904e
2 changed files with 6 additions and 2 deletions

View File

@ -5135,6 +5135,7 @@ HRESULT create_glyphrunanalysis(const struct glyphrunanalysis_desc *desc, IDWrit
IDWriteFontFace1 *fontface1;
D2D_POINT_2F origin;
FLOAT rtl_factor;
HRESULT hr;
UINT32 i;
*ret = NULL;
@ -5196,7 +5197,8 @@ HRESULT create_glyphrunanalysis(const struct glyphrunanalysis_desc *desc, IDWrit
memcpy(analysis->glyphs, desc->run->glyphIndices, desc->run->glyphCount*sizeof(*desc->run->glyphIndices));
IDWriteFontFace_GetMetrics(desc->run->fontFace, &metrics);
IDWriteFontFace_QueryInterface(desc->run->fontFace, &IID_IDWriteFontFace1, (void **)&fontface1);
if (FAILED(hr = IDWriteFontFace_QueryInterface(desc->run->fontFace, &IID_IDWriteFontFace1, (void **)&fontface1)))
WARN("Failed to get IDWriteFontFace1, %#x.\n", hr);
origin.x = desc->origin_x * desc->ppdip;
origin.y = desc->origin_y * desc->ppdip;

View File

@ -1449,13 +1449,15 @@ static HRESULT compute_glyph_origins(DWRITE_GLYPH_RUN const *run, DWRITE_MEASURI
IDWriteFontFace1 *fontface1 = NULL;
DWRITE_FONT_METRICS metrics;
FLOAT rtl_factor;
HRESULT hr;
UINT32 i;
rtl_factor = run->bidiLevel & 1 ? -1.0f : 1.0f;
if (run->fontFace) {
IDWriteFontFace_GetMetrics(run->fontFace, &metrics);
IDWriteFontFace_QueryInterface(run->fontFace, &IID_IDWriteFontFace1, (void **)&fontface1);
if (FAILED(hr = IDWriteFontFace_QueryInterface(run->fontFace, &IID_IDWriteFontFace1, (void **)&fontface1)))
WARN("Failed to get IDWriteFontFace1, %#x.\n", hr);
}
for (i = 0; i < run->glyphCount; i++) {