dwrite: Handle QI failure (Coverity)
Nikolay Sivov
nsivov at codeweavers.com
Sat Aug 22 13:07:17 CDT 2015
---
-------------- next part --------------
From 80e8040b1c72ad700d34789be9b08ffa67eda35b Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sat, 22 Aug 2015 21:04:03 +0300
Subject: [PATCH] dwrite: Handle QI failure (Coverity)
---
dlls/dwrite/font.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index a0596ea..f86a908 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -3597,8 +3597,13 @@ static void glyphrunanalysis_render(struct dwrite_glyphrunanalysis *analysis, DW
BOOL is_rtl, nohint;
FLOAT origin_x;
UINT32 i, size;
+ HRESULT hr;
- IDWriteFontFace_QueryInterface(analysis->run.fontFace, &IID_IDWriteFontFace2, (void**)&fontface2);
+ hr = IDWriteFontFace_QueryInterface(analysis->run.fontFace, &IID_IDWriteFontFace2, (void**)&fontface2);
+ if (FAILED(hr)) {
+ WARN("failed to get IDWriteFontFace2, 0x%08x\n", hr);
+ return;
+ }
nohint = analysis->rendering_mode == DWRITE_RENDERING_MODE_NATURAL || analysis->rendering_mode == DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC;
--
2.1.4
More information about the wine-patches
mailing list