diff options
| -rw-r--r-- | src/com/android/gallery3d/ui/TimeLineSlotView.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/ui/TimeLineSlotView.java b/src/com/android/gallery3d/ui/TimeLineSlotView.java index 5c93d31bd..81fc3a57c 100644 --- a/src/com/android/gallery3d/ui/TimeLineSlotView.java +++ b/src/com/android/gallery3d/ui/TimeLineSlotView.java @@ -107,9 +107,10 @@ public class TimeLineSlotView extends GLView { return; } Rect rect = mLayout.getSlotRect(index); - int position = (rect.top + rect.bottom - getHeight()) / 2; - - setScrollPosition(position); + if (rect != null) { + int position = (rect.top + rect.bottom - getHeight()) / 2; + setScrollPosition(position); + } } public void makeSlotVisible(int index) { |
