summaryrefslogtreecommitdiffstats
path: root/src/core/user_resource_controller_host.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/user_resource_controller_host.cpp')
-rw-r--r--src/core/user_resource_controller_host.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/user_resource_controller_host.cpp b/src/core/user_resource_controller_host.cpp
index b2de41cc0..9d2ba8eb8 100644
--- a/src/core/user_resource_controller_host.cpp
+++ b/src/core/user_resource_controller_host.cpp
@@ -81,7 +81,8 @@ void UserResourceControllerHost::WebContentsObserverHelper::RenderViewCreated(co
void UserResourceControllerHost::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))