summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_modal_dialog_win.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-23 01:17:35 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-23 01:17:35 +0000
commit66711f6f7abbf3ed9f0d39e4f497620ab39e79f0 (patch)
treee341e531b756e3dc290fd04d94c30a4da59b25b1 /chrome/browser/app_modal_dialog_win.cc
parent8516471942ded5ca17efd0681f1ae12ac86f3617 (diff)
downloadchromium_src-66711f6f7abbf3ed9f0d39e4f497620ab39e79f0.zip
chromium_src-66711f6f7abbf3ed9f0d39e4f497620ab39e79f0.tar.gz
chromium_src-66711f6f7abbf3ed9f0d39e4f497620ab39e79f0.tar.bz2
Fix a crash when we try to close a js dialog that wasn't shown.
The dialog has been queued, but it hasn't been shown because a different dialog is already showing. We try to close the dialog because a page navigation has occurred. BUG=47056 TEST=None Review URL: http://codereview.chromium.org/2803017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50561 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_modal_dialog_win.cc')
-rw-r--r--chrome/browser/app_modal_dialog_win.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/app_modal_dialog_win.cc b/chrome/browser/app_modal_dialog_win.cc
index c892881..e48d986 100644
--- a/chrome/browser/app_modal_dialog_win.cc
+++ b/chrome/browser/app_modal_dialog_win.cc
@@ -19,9 +19,11 @@ void AppModalDialog::CreateAndShowDialog() {
}
void AppModalDialog::ActivateModalDialog() {
+ DCHECK(dialog_);
dialog_->ActivateModalDialog();
}
void AppModalDialog::CloseModalDialog() {
+ DCHECK(dialog_);
dialog_->CloseModalDialog();
}