From a6ba0d2c133825c97c935cc9e0bec04d2b27c4bb Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Tue, 28 Jul 2009 21:05:32 +0000 Subject: Add a NULL check for the pending render view host when we get a close message. I don't think we're guaranteed to have a pending one. BUG=17916 Review URL: http://codereview.chromium.org/160286 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21887 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/tab_contents/render_view_host_manager.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/browser/tab_contents/render_view_host_manager.cc b/chrome/browser/tab_contents/render_view_host_manager.cc index 959db7f..e25f786 100644 --- a/chrome/browser/tab_contents/render_view_host_manager.cc +++ b/chrome/browser/tab_contents/render_view_host_manager.cc @@ -220,7 +220,8 @@ void RenderViewHostManager::ShouldClosePage(bool for_cross_site_transition, // might be because the renderer was deemed unresponsive and this call was // already made by ShouldCloseTabOnUnresponsiveRenderer. In that case, it // is ok to do nothing here. - if (pending_render_view_host_->are_navigations_suspended()) + if (pending_render_view_host_ && + pending_render_view_host_->are_navigations_suspended()) pending_render_view_host_->SetNavigationsSuspended(false); } else { // Current page says to cancel. -- cgit v1.1