summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-09-16 08:57:13 +0200
committerLiang Qi <liang.qi@qt.io>2016-09-16 08:57:13 +0200
commit9c0bd9207560e36e7bad3657e02305aabd7638b9 (patch)
tree137bd160fc1ee51fedabfe7a03e8697a2b5a3160 /src/core
parentce2f1b140d2d417f925ec54c8a095981827f7e68 (diff)
parent2f24e3c307aecb657736310948c7cdaad5176678 (diff)
Merge remote-tracking branch 'origin/5.6.2' into 5.6
Diffstat (limited to 'src/core')
-rw-r--r--src/core/user_script_controller_host.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/user_script_controller_host.cpp b/src/core/user_script_controller_host.cpp
index a0d3f6fed..4dcd1a071 100644
--- a/src/core/user_script_controller_host.cpp
+++ b/src/core/user_script_controller_host.cpp
@@ -78,7 +78,8 @@ void UserScriptControllerHost::WebContentsObserverHelper::RenderViewCreated(cont
void UserScriptControllerHost::WebContentsObserverHelper::RenderViewHostChanged(content::RenderViewHost *oldHost,
content::RenderViewHost *newHost)
{
- oldHost->Send(new RenderViewObserverHelper_ClearScripts(oldHost->GetRoutingID()));
+ if (oldHost)
+ oldHost->Send(new RenderViewObserverHelper_ClearScripts(oldHost->GetRoutingID()));
content::WebContents *contents = web_contents();
Q_FOREACH (const UserScript &script, m_controllerHost->m_perContentsScripts.value(contents))