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:
Kartikaya Gupta 2011-10-25 14:02:12 -04:00
Родитель 408a44b504
Коммит 834be3d1e3
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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);