Commit 6541025e authored by Viktor Engelmann's avatar Viktor Engelmann
Browse files

Replace ASSERT in FaviconManager::setIcon by return


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: default avatarMichael Brüning <michael.bruning@qt.io>
Showing with 1 addition and 3 deletions
......@@ -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];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment