catch NPE in getVideoPreview() because getFrame sometimes returns null

This commit is contained in:
Daniel Gultsch 2016-08-02 10:57:50 +02:00
parent ed2fa20414
commit 8b331895d1

View file

@ -417,7 +417,7 @@ public class FileBackend {
frame = metadataRetriever.getFrameAtTime(0);
metadataRetriever.release();
frame = resize(frame, size);
} catch(IllegalArgumentException e) {
} catch(IllegalArgumentException | NullPointerException e) {
frame = Bitmap.createBitmap(size,size, Bitmap.Config.ARGB_8888);
frame.eraseColor(0xff000000);
}