mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1014987 - Gracefully handle out-of-bounds positions in TabsStripAdapter (r=mcomella)
This commit is contained in:
parent
95fca9293a
commit
87cb2645c5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user