From b5fc085e712815bcd465370f88d1df8179b538e3 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Wed, 2 Nov 2016 10:40:37 +0100 Subject: Add QPixmapIconEngine::pixmap pointer check Dereference after null check (FORWARD_NULL)5. var_deref_op: Dereferencing null pointer pe. pe pointer it's being checked at the beginning of the function so it implies pe might be null. Coverity-Id: 11106 Change-Id: Ie88b27877a46cdd20a317fb5e21c3fdec1b99dda Reviewed-by: Edward Welbourne --- src/gui/image/qicon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 3531be412e..5098955825 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -294,7 +294,7 @@ QPixmap QPixmapIconEngine::pixmap(const QSize &size, QIcon::Mode mode, QIcon::St QString key = QLatin1String("qt_") % HexString(pm.cacheKey()) - % HexString(pe->mode) + % HexString(pe ? pe->mode : QIcon::Normal) % HexString(QGuiApplication::palette().cacheKey()) % HexString(actualSize.width()) % HexString(actualSize.height()); -- cgit v1.2.3