summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/mpo/MpoParser.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/mpo/MpoParser.java b/src/com/android/gallery3d/mpo/MpoParser.java
index f865ca061..b872db640 100644
--- a/src/com/android/gallery3d/mpo/MpoParser.java
+++ b/src/com/android/gallery3d/mpo/MpoParser.java
@@ -177,6 +177,11 @@ public class MpoParser {
MpEntry mpEntry = null;
byte[] data = null;
+ if(mMpEntries.size() < 2){
+ // not enough entries were read.
+ return null;
+ }
+
if(primary) {
if(mMpEntries.size() > 2) {
mpEntry = mMpEntries.get(1);