summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher2/PagedViewCellLayout.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher2/PagedViewCellLayout.java b/src/com/android/launcher2/PagedViewCellLayout.java
index 54bdec40c..6a3c84d03 100644
--- a/src/com/android/launcher2/PagedViewCellLayout.java
+++ b/src/com/android/launcher2/PagedViewCellLayout.java
@@ -169,7 +169,11 @@ public class PagedViewCellLayout extends ViewGroup implements Page {
@Override
public void removeViewOnPageAt(int index) {
mChildren.removeViewAt(index);
- mHolographicChildren.removeViewAt(index);
+ // Holographic icons are disabled in certain cases (on lower hardware, or if there is only
+ // one page), so check before we try and remove the view at a specified index.
+ if (mHolographicChildren.getChildAt(index) != null) {
+ mHolographicChildren.removeViewAt(index);
+ }
}
@Override