summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorViktor Engelmann <viktor.engelmann@qt.io>2016-10-06 16:08:30 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2016-10-12 05:40:02 +0000
commitd82fb129145f933659f0315ca6203ab51c24937a (patch)
tree6158ea53bf3ba14c5fbc303579c011a4fd731839 /src
parentafedaaf2492ea4899198cb9886f9e249c6cbe119 (diff)
Fix nullpointer dereferencing error
Check whether iconUrls is NULL before calling contains(iconUrl) on it, which, under certain circumstances, caused a SEGFAULT. Task-number: QTBUG-56330 Change-Id: Ia167d68a4c4d62af4740a8cbab2686bfbc975455 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src')
-rw-r--r--src/webengine/api/qquickwebenginefaviconprovider.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/webengine/api/qquickwebenginefaviconprovider.cpp b/src/webengine/api/qquickwebenginefaviconprovider.cpp
index fe8436d6c..b5ad6960a 100644
--- a/src/webengine/api/qquickwebenginefaviconprovider.cpp
+++ b/src/webengine/api/qquickwebenginefaviconprovider.cpp
@@ -152,7 +152,7 @@ QQuickWebEngineView *QQuickWebEngineFaviconProvider::viewForIconUrl(const QUrl &
// latest WebEngineView which was raised an iconChanged signal.
if (m_latestView) {
QList<QUrl> *iconUrls = m_iconUrlMap[m_latestView];
- if (iconUrls->contains(iconUrl))
+ if (iconUrls && iconUrls->contains(iconUrl))
return m_latestView;
}