From e7e6d6f95a029abb52dcbb541bc333fa05cc4929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Tue, 2 Dec 2014 13:28:08 +0000 Subject: [PATCH] QFontEngine_FT: Don't check for null after dereferencing. Must have been a copy paste mistake, the check is used in other places to make sure we don't unlockFace() without a lockFace(), but here we're certain lockFace() was called first. Makes Coverity happy. Change-Id: I679129727b29a40d780f4fa903f44f7cbc9ec8cf Reviewed-by: Friedemann Kleint Reviewed-by: Konstantin Ritt --- src/gui/text/qfontengine_ft.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 44c0a50bfc..e2c8f905b9 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -1771,8 +1771,7 @@ glyph_metrics_t QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, QFixed subPixe overall.x = TRUNC(left); overall.y = -TRUNC(top); overall.xoff = TRUNC(ROUND(face->glyph->advance.x)); - if (face) - unlockFace(); + unlockFace(); } return overall; }