summaryrefslogtreecommitdiffstats
path: root/src/core/net/proxying_url_loader_factory_qt.cpp
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2021-02-11 13:23:25 +0100
committerSzabolcs David <davidsz@inf.u-szeged.hu>2021-02-11 13:52:31 +0100
commit095105140a145773d9d46983a23f50a5fc30b5ce (patch)
tree94e3bcc3eb8d51ca686d431760220db1c0e8cfde /src/core/net/proxying_url_loader_factory_qt.cpp
parent1905b33d7c3e1c338db218e97794a4db63b2811e (diff)
Fix crash on meet.google.com
This site crashes after 0185f41 when it tries to use the Hangouts extension. Background WebContent of this extension (and future guest views) doesn't have a corresponding WebContentsAdapterClient. Change-Id: I2028372a176a7194bf037093f9364d942bef969a Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/net/proxying_url_loader_factory_qt.cpp')
-rw-r--r--src/core/net/proxying_url_loader_factory_qt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/net/proxying_url_loader_factory_qt.cpp b/src/core/net/proxying_url_loader_factory_qt.cpp
index c541c17b6..ec107fe70 100644
--- a/src/core/net/proxying_url_loader_factory_qt.cpp
+++ b/src/core/net/proxying_url_loader_factory_qt.cpp
@@ -236,8 +236,8 @@ QWebEngineUrlRequestInterceptor* InterceptedRequest::getPageInterceptor()
{
if (auto wc = webContents()) {
auto view = static_cast<content::WebContentsImpl *>(wc)->GetView();
- WebContentsAdapterClient *client = WebContentsViewQt::from(view)->client();
- return client->webContentsAdapter()->requestInterceptor();
+ if (WebContentsAdapterClient *client = WebContentsViewQt::from(view)->client())
+ return client->webContentsAdapter()->requestInterceptor();
}
return nullptr;
}