Commit b4598aeb authored by Peter E Conn's avatar Peter E Conn Committed by Commit Bot

🛃 Check for Tab being null before accessing pending URL.

Bug: 808015
Change-Id: Id4a83971a028caa7bfd6e5b00d7d5f16bdb49213
Reviewed-on: https://chromium-review.googlesource.com/897527Reviewed-by: default avatarBernhard Bauer <bauerb@chromium.org>
Commit-Queue: Peter Conn <peconn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533738}
parent fdac8924
...@@ -503,6 +503,9 @@ public class CustomTabActivity extends ChromeActivity { ...@@ -503,6 +503,9 @@ public class CustomTabActivity extends ChromeActivity {
@Override @Override
@Nullable @Nullable
public String getPendingUrl() { public String getPendingUrl() {
if (getActivityTab() == null) return null;
if (getActivityTab().getWebContents() == null) return null;
NavigationEntry entry = getActivityTab().getWebContents().getNavigationController() NavigationEntry entry = getActivityTab().getWebContents().getNavigationController()
.getPendingEntry(); .getPendingEntry();
return entry != null ? entry.getUrl() : null; return entry != null ? entry.getUrl() : null;
......
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