summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 409514411..581a16adb 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -354,9 +354,10 @@ void WebContentsDelegateQt::cancelGeolocationPermissionRequest(const GURL &reque
void WebContentsDelegateQt::geolocationPermissionReply(const QUrl &origin, bool permission)
{
- if (m_geolocationPermissionRequests.contains(origin)) {
- m_geolocationPermissionRequests[origin].Run(permission);
- m_geolocationPermissionRequests.remove(origin);
+ auto it = m_geolocationPermissionRequests.find(origin);
+ if (it != m_geolocationPermissionRequests.end()) {
+ (*it).Run(permission);
+ m_geolocationPermissionRequests.erase(it);
}
}