From 8b331895d13653b6bb5f808489b428f5cfcd81a0 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 2 Aug 2016 10:57:50 +0200 Subject: [PATCH] catch NPE in getVideoPreview() because getFrame sometimes returns null --- .../java/eu/siacs/conversations/persistance/FileBackend.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java index d40636528..843cb155d 100644 --- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java @@ -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); }