aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/UIHelper.java7
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 23fc48bb..ed1db287 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/")) {