Bug 714762 - ArrayIndexOutOfBoundsException at Tabs.getTabAt [r=kats]
authorMark Finkle <mfinkle@mozilla.com>
Tue, 03 Jan 2012 12:19:47 -0500
changeset 84919 94c669ea03c2314d95f586fe613d07263711145c
parent 84918 c90dc56f83f0d52b61197b9ae93a5493a1f9f7dd
child 84920 91e7e04c53b5f3a6a6e09902fb265b93320ca677
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs714762
milestone12.0a1
Bug 714762 - ArrayIndexOutOfBoundsException at Tabs.getTabAt [r=kats]
mobile/android/base/Tabs.java
--- a/mobile/android/base/Tabs.java
+++ b/mobile/android/base/Tabs.java
@@ -101,17 +101,17 @@ public class Tabs implements GeckoEventL
         return tabs.get(id);
     }
 
     public int getIndexOf(Tab tab) {
         return order.lastIndexOf(tab);
     }
 
     public Tab getTabAt(int index) {
-        if (index < order.size())
+        if (index >= 0 && index < order.size())
             return order.get(index);
         else
             return null;
     }
 
     public Tab getSelectedTab() {
         return tabs.get(selectedTab);
     }