summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/shell_window.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/shell_window.cc b/apps/shell_window.cc
index cd8ddd0..4317883 100644
--- a/apps/shell_window.cc
+++ b/apps/shell_window.cc
@@ -286,8 +286,12 @@ void ShellWindow::RequestToLockMouse(WebContents* web_contents,
void ShellWindow::OnNativeClose() {
ShellWindowRegistry::Get(profile_)->RemoveShellWindow(this);
- if (shell_window_contents_)
+ if (shell_window_contents_) {
+ WebContents* web_contents = shell_window_contents_->GetWebContents();
+ WebContentsModalDialogManager::FromWebContents(web_contents)->
+ SetDelegate(NULL);
shell_window_contents_->NativeWindowClosed();
+ }
delete this;
}