зеркало из https://github.com/mozilla/pjs.git
Bug 697183 - Fix crash on rotation (r=lucasr)
Prevent an NullPointerException caused by mBrowserToolbar not being initialized before use. Happens only on rotation because it gets used only when there is an active tab.
This commit is contained in:
Родитель
408a44b504
Коммит
834be3d1e3
|
@ -1065,6 +1065,9 @@ abstract public class GeckoApp
|
|||
|
||||
// setup gecko layout
|
||||
mGeckoLayout = (RelativeLayout) findViewById(R.id.gecko_layout);
|
||||
mMainLayout = (LinearLayout) findViewById(R.id.main_layout);
|
||||
mBrowserToolbar = (BrowserToolbar) findViewById(R.id.browser_toolbar);
|
||||
|
||||
mDoorHanger = new DoorHanger(this);
|
||||
|
||||
Tab tab = Tabs.getInstance().getSelectedTab();
|
||||
|
@ -1110,9 +1113,6 @@ abstract public class GeckoApp
|
|||
});
|
||||
}
|
||||
|
||||
mMainLayout = (LinearLayout) findViewById(R.id.main_layout);
|
||||
mBrowserToolbar = (BrowserToolbar) findViewById(R.id.browser_toolbar);
|
||||
|
||||
//register for events
|
||||
GeckoAppShell.registerGeckoEventListener("DOMContentLoaded", GeckoApp.mAppContext);
|
||||
GeckoAppShell.registerGeckoEventListener("DOMTitleChanged", GeckoApp.mAppContext);
|
||||
|
|
Загрузка…
Ссылка в новой задаче