From 8b331895d13653b6bb5f808489b428f5cfcd81a0 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 2 Aug 2016 10:57:50 +0200 Subject: catch NPE in getVideoPreview() because getFrame sometimes returns null --- src/main/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 d4063652..843cb155 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); } -- cgit v1.2.3