mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 766865 - java.lang.IndexOutOfBoundsException in TabsTray.addTab [r=margaret]
This commit is contained in:
parent
1da57426b1
commit
f5d637bb3f
@ -134,6 +134,10 @@ public class TabsTray extends LinearLayout
|
||||
|
||||
int index = Tabs.getInstance().getIndexOf(tab);
|
||||
if (msg == Tabs.TabEvents.ADDED) {
|
||||
if (index == -1) // If the tab has already been removed, do nothing.
|
||||
return;
|
||||
if (index > mTabsAdapter.getCount())
|
||||
index = mTabsAdapter.getCount();
|
||||
mTabsAdapter.addTab(index, tab);
|
||||
mTabsAdapter.notifyDataSetChanged();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user