diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-28 21:05:32 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-28 21:05:32 +0000 |
commit | a6ba0d2c133825c97c935cc9e0bec04d2b27c4bb (patch) | |
tree | 229d5ff03405bed85ea4038d8504740d3c296d53 | |
parent | e64ff5ef1675d78a38a251eb98dba2e0c8af61b7 (diff) | |
download | chromium_src-a6ba0d2c133825c97c935cc9e0bec04d2b27c4bb.zip chromium_src-a6ba0d2c133825c97c935cc9e0bec04d2b27c4bb.tar.gz chromium_src-a6ba0d2c133825c97c935cc9e0bec04d2b27c4bb.tar.bz2 |
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
-rw-r--r-- | chrome/browser/tab_contents/render_view_host_manager.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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. |