OSDN Git Service

Dont NPE if the thumbnail file cannot be opened.
authorChih-Chung Chang <chihchung@google.com>
Tue, 29 Sep 2009 23:30:30 +0000 (16:30 -0700)
committerChih-Chung Chang <chihchung@google.com>
Tue, 29 Sep 2009 23:31:16 +0000 (16:31 -0700)
media/java/android/media/MiniThumbFile.java

index 3cc115e..22c6459 100644 (file)
@@ -119,7 +119,9 @@ public class MiniThumbFile {
                     // ignore exception
                 }
             }
-            mChannel = mMiniThumbFile.getChannel();
+            if (mMiniThumbFile != null) {
+                mChannel = mMiniThumbFile.getChannel();
+            }
         }
         return mMiniThumbFile;
     }