summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_view.cc
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 22:33:36 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 22:33:36 +0000
commit8029f5671e3f679c6d26ce0feb0ab8c0b06138ed (patch)
tree6e50adbc6b7fd8ab46cbe27f31d4dfd05e7391c1 /chrome/renderer/render_view.cc
parent76b13e3705e0d1e7f8ec21a7ef4fdf2290eea417 (diff)
downloadchromium_src-8029f5671e3f679c6d26ce0feb0ab8c0b06138ed.zip
chromium_src-8029f5671e3f679c6d26ce0feb0ab8c0b06138ed.tar.gz
chromium_src-8029f5671e3f679c6d26ce0feb0ab8c0b06138ed.tar.bz2
Fix renderer crash when a file chooser is closed after navigating away from
its originating page. BUG=5630 Review URL: http://codereview.chromium.org/50067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12224 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r--chrome/renderer/render_view.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 961c665..4094ce6 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2614,6 +2614,11 @@ void RenderView::OnInstallMissingPlugin() {
void RenderView::OnFileChooserResponse(
const std::vector<std::wstring>& file_names) {
+ // This could happen if we navigated to a different page before the user
+ // closed the chooser.
+ if (!file_chooser_.get())
+ return;
+
file_chooser_->OnFileChoose(file_names);
file_chooser_.reset();
}