Commit fd9ebad1 authored by Stepan Khapugin's avatar Stepan Khapugin Committed by Commit Bot

[iOS] Fix a potential null dereference in LocationBarMediator.

Adds a check before dereferencing self.webState.

Bug: 1055334
Change-Id: Iaa046b5975d72cb7632783289ed9fdb9088a15f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2080418
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Robbie Gibson <rkgibson@google.com>
Auto-Submit: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarRobbie Gibson <rkgibson@google.com>
Cr-Commit-Position: refs/heads/master@{#745449}
parent 35cc5976
......@@ -341,6 +341,10 @@
if (self.webContentAreaShowingOverlay)
return NO;
if (!self.webState) {
return NO;
}
const GURL& URL = self.webState->GetLastCommittedURL();
return URL.is_valid() && !web::GetWebClient()->IsAppSpecificURL(URL);
}
......
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