mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
catch NPE in getVideoPreview() because getFrame sometimes returns null
This commit is contained in:
parent
ed2fa20414
commit
8b331895d1
@ -417,7 +417,7 @@ public class FileBackend {
|
|||||||
frame = metadataRetriever.getFrameAtTime(0);
|
frame = metadataRetriever.getFrameAtTime(0);
|
||||||
metadataRetriever.release();
|
metadataRetriever.release();
|
||||||
frame = resize(frame, size);
|
frame = resize(frame, size);
|
||||||
} catch(IllegalArgumentException e) {
|
} catch(IllegalArgumentException | NullPointerException e) {
|
||||||
frame = Bitmap.createBitmap(size,size, Bitmap.Config.ARGB_8888);
|
frame = Bitmap.createBitmap(size,size, Bitmap.Config.ARGB_8888);
|
||||||
frame.eraseColor(0xff000000);
|
frame.eraseColor(0xff000000);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user