Commit 96c972ea authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Don't call to a possibly-null manager.

The SigninViewControllerDelegate, as a modal dialog manager
delegate, will outlive the manager. If so, don't call through
to a non-existent manager.

BUG=771872,771142
TBR=wittman@chromium.org

Change-Id: Ia020c026094c3092e4946155d3437c2855951595
Reviewed-on: https://chromium-review.googlesource.com/702515Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506794}
parent 4c1ef642
......@@ -41,7 +41,8 @@ SigninViewControllerDelegate::SigninViewControllerDelegate(
SigninViewControllerDelegate::~SigninViewControllerDelegate() {
web_modal::WebContentsModalDialogManager* manager =
web_modal::WebContentsModalDialogManager::FromWebContents(web_contents_);
manager->SetDelegate(nullptr);
if (manager)
manager->SetDelegate(nullptr);
}
void SigninViewControllerDelegate::AttachDialogManager() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment