summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/ui/TimeLineSlotView.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/ui/TimeLineSlotView.java b/src/com/android/gallery3d/ui/TimeLineSlotView.java
index c2c32234e..2bce76865 100644
--- a/src/com/android/gallery3d/ui/TimeLineSlotView.java
+++ b/src/com/android/gallery3d/ui/TimeLineSlotView.java
@@ -625,6 +625,10 @@ public class TimeLineSlotView extends GLView {
} if (indexEnd<0) {
indexEnd = (indexEnd * (- 1)) - 1;
}
+
+ if (indexStart > mHeightList.size() - 1) {
+ indexStart = mHeightList.size() - 1;
+ }
int startSlotIndex = mHeightList.indexOf(mHeightList.get(indexStart));
if(indexEnd> mHeightList.size()-1) {
indexEnd = mHeightList.size()-1;