summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2016-11-02 10:40:37 +0100
committerJesus Fernandez <jesus.fernandez@qt.io>2016-11-02 10:56:51 +0000
commitb5fc085e712815bcd465370f88d1df8179b538e3 (patch)
treec43c0abeff035d89a23a7bcda92702950f0346e9 /src/gui
parentc5010107221ce1ba8dd08f2067c7921389baa96b (diff)
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 <edward.welbourne@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qicon.cpp2
1 files changed, 1 insertions, 1 deletions
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<quint64>(pm.cacheKey())
- % HexString<uint>(pe->mode)
+ % HexString<uint>(pe ? pe->mode : QIcon::Normal)
% HexString<quint64>(QGuiApplication::palette().cacheKey())
% HexString<uint>(actualSize.width())
% HexString<uint>(actualSize.height());