Commit fbc6125c authored by clamy's avatar clamy Committed by Commit Bot

Fix crash in CaptivePortalTabReloader

This CL adds a null check for the last committed NavigationEntry to fix
a crash in CaptivePortalTabReloader.

Bug: 857002
Change-Id: Ia26bd420cbee80958b3a74937ade9efb764ed03a
Reviewed-on: https://chromium-review.googlesource.com/1146657
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577919}
parent d45e3a59
......@@ -266,8 +266,10 @@ void CaptivePortalTabReloader::ReloadTabIfNeeded() {
void CaptivePortalTabReloader::ReloadTab() {
content::NavigationController* controller = &web_contents_->GetController();
if (!controller->GetLastCommittedEntry()->GetHasPostData())
if (controller->GetLastCommittedEntry() &&
!controller->GetLastCommittedEntry()->GetHasPostData()) {
controller->Reload(content::ReloadType::NORMAL, true);
}
}
void CaptivePortalTabReloader::MaybeOpenCaptivePortalLoginTab() {
......
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