1
0
mirror of https://github.com/accelforce/Yuito synced 2024-12-27 00:03:23 +01:00

fix crash caused by broken mention (#1360)

This commit is contained in:
Konrad Pozniak 2019-07-02 10:55:02 +02:00 committed by GitHub
parent c861c992ca
commit fdee75c84a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,9 @@ public class LinkHelper {
return "";
}
String host = uri.getHost();
if (host.startsWith("www.")) {
if(host == null) {
return "";
} else if (host.startsWith("www.")) {
return host.substring(4);
} else {
return host;