aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Message.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Message.java b/src/main/java/de/pixart/messenger/entities/Message.java
index 3277952bb..8c55c57c4 100644
--- a/src/main/java/de/pixart/messenger/entities/Message.java
+++ b/src/main/java/de/pixart/messenger/entities/Message.java
@@ -730,10 +730,14 @@ public class Message extends AbstractEntity {
if (treatAsDownloadable == null) {
try {
final String[] lines = body.split("\n");
+ if (lines.length == 0) {
+ treatAsDownloadable = false;
+ return false;
+ }
for (String line : lines) {
if (line.contains("\\s+")) {
treatAsDownloadable = false;
- return treatAsDownloadable;
+ return false;
}
}
final URL url = new URL(lines[0]);