Bug 1014987 - Gracefully handle out-of-bounds positions in TabsStripAdapter (r=mcomella)

This commit is contained in:
Lucas Rocha 2014-09-11 00:27:01 +01:00
parent 95fca9293a
commit 87cb2645c5

View File

@ -30,7 +30,9 @@ class TabStripAdapter extends BaseAdapter {
@Override
public Tab getItem(int position) {
return (tabs != null ? tabs.get(position) : null);
return (tabs != null &&
position >= 0 &&
position < tabs.size() ? tabs.get(position) : null);
}
@Override