Commit cd424e99 authored by Michael Kolb's avatar Michael Kolb
Browse files

fix NPEs after delayed start

    Bug: 3476031
    Bug: 3480829
    add check for valid tab

Change-Id: I4430ba2f369125fe263599aa5c8b3460bf6e7ffa
parent 29ccf8a3
......@@ -317,7 +317,10 @@ public class Controller
if (urlData.isEmpty()) {
loadUrl(webView, mSettings.getHomePage());
} else {
loadUrlDataIn(t, urlData);
// monkey protection against delayed start
if (t != null) {
loadUrlDataIn(t, urlData);
}
}
} else {
mTabControl.restoreState(icicle, currentTab, restoreIncognitoTabs,
......@@ -2088,9 +2091,12 @@ public class Controller
}
protected void setActiveTab(Tab tab) {
mTabControl.setCurrentTab(tab);
// the tab is guaranteed to have a webview after setCurrentTab
mUi.setActiveTab(tab);
// monkey protection against delayed start
if (tab != null) {
mTabControl.setCurrentTab(tab);
// the tab is guaranteed to have a webview after setCurrentTab
mUi.setActiveTab(tab);
}
}
protected void closeEmptyChildTab() {
......
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