Bug 773177 - java.lang.NullPointerException: at org.mozilla.gecko.TabsTray$TabsAdapter.refreshTabsData(TabsTray.java). r=mfinkle

This commit is contained in:
Margaret Leibovic 2012-07-12 11:09:47 -07:00
parent 43f4ce6a1f
commit 2f04e11ef9

View File

@ -193,8 +193,11 @@ public class TabsTray extends LinearLayout
// accidentally updating it on the wrong thread.
mTabs = new ArrayList<Tab>();
ArrayList<Tab> tabs = Tabs.getInstance().getTabsInOrder();
for (Tab tab : tabs) {
mTabs.add(tab);
if (tabs != null) {
for (Tab tab : tabs) {
mTabs.add(tab);
}
}
notifyDataSetChanged(); // Be sure to call this whenever mTabs changes.