diff options
Diffstat (limited to 'src/main/java/eu/siacs/conversations/utils')
-rw-r--r-- | src/main/java/eu/siacs/conversations/utils/UIHelper.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java index 23fc48bb7..ed1db2875 100644 --- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java @@ -171,7 +171,12 @@ public class UIHelper { if (path == null) { return ""; } - final String mime = URLConnection.guessContentTypeFromName(path); + final String mime; + try { + mime = URLConnection.guessContentTypeFromName(path); + } catch (final StringIndexOutOfBoundsException ignored) { + return ""; + } if (mime == null) { return ""; } else if (mime.startsWith("audio/")) { |