From 6541025ebc76bafdcdb38da5c05708df14406396 Mon Sep 17 00:00:00 2001 From: Viktor Engelmann Date: Wed, 4 Jan 2017 12:41:02 +0100 Subject: Replace ASSERT in FaviconManager::setIcon by return MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ASSERT in FaviconManager::setIcon can be triggered by what seems to be a race condition. Apparently the old request can be gone (so m_inProgressRequests.contains(id) is false), but m_inProgressRequests can still be non-empty, because of a new request to the same URL, so this case is not covered by checking m_inProgressRequests.isEmpty() before. Task-number: QTBUG-57900 Change-Id: I2f26c05e5c97e4bd8d1cea03e8005cf61f2b0c98 Reviewed-by: Michael BrĂ¼ning --- src/core/favicon_manager.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/favicon_manager.cpp b/src/core/favicon_manager.cpp index be8d17725..214fd5fa7 100644 --- a/src/core/favicon_manager.cpp +++ b/src/core/favicon_manager.cpp @@ -138,11 +138,9 @@ void FaviconManagerPrivate::storeIcon(int id, const QIcon &icon) Q_Q(FaviconManager); // Icon download has been interrupted - if (m_inProgressRequests.isEmpty()) + if (!m_inProgressRequests.contains(id)) return; - Q_ASSERT(m_inProgressRequests.contains(id)); - QUrl requestUrl = m_inProgressRequests[id]; FaviconInfo &faviconInfo = q->m_faviconInfoMap[requestUrl]; -- cgit v1.2.3