Bug 1089668 - Avoid NPE on parent when tab strip item is pressed (r=mcomella)
authorLucas Rocha <lucasr@lucasr.org>
Wed, 29 Oct 2014 17:39:12 +0000
changeset 212982 01f8966912846865617171d1b8ebc4a565594449
parent 212981 3e842e9a5746b7f50709d1a804a41baa320022d6
child 212983 e3194c623ac67f21e17c5e66d3f858e26ac71514
push id51106
push userryanvm@gmail.com
push dateWed, 29 Oct 2014 20:52:00 +0000
treeherdermozilla-inbound@8512443e6e4f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs1089668
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1089668 - Avoid NPE on parent when tab strip item is pressed (r=mcomella)
mobile/android/base/tabs/TabStripItemView.java
--- a/mobile/android/base/tabs/TabStripItemView.java
+++ b/mobile/android/base/tabs/TabStripItemView.java
@@ -183,17 +183,19 @@ public class TabStripItemView extends Th
 
     @Override
     public void setPressed(boolean pressed) {
         super.setPressed(pressed);
 
         // The surrounding tab strip dividers need to be hidden
         // when a tab item enters pressed state.
         View parent = (View) getParent();
-        parent.invalidate();
+        if (parent != null) {
+            parent.invalidate();
+        }
     }
 
     void updateFromTab(Tab tab) {
         if (tab == null) {
             return;
         }
 
         id = tab.getId();