From 9436a838c0960ac170ac1e7de1428aa2341d2e4e Mon Sep 17 00:00:00 2001 From: Nila <43315617+nilathedragon@users.noreply.github.com> Date: Tue, 25 Jul 2023 17:28:41 +0200 Subject: [PATCH] Do not assume languages array will contain entries --- .../src/main/java/org/joinmastodon/android/model/Instance.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/model/Instance.java b/mastodon/src/main/java/org/joinmastodon/android/model/Instance.java index fcedf31ee..b4d523420 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/model/Instance.java +++ b/mastodon/src/main/java/org/joinmastodon/android/model/Instance.java @@ -117,7 +117,7 @@ public class Instance extends BaseModel{ ci.domain=uri; ci.normalizedDomain=IDN.toUnicode(uri); ci.description=Html.fromHtml(shortDescription).toString().trim(); - if(languages!=null){ + if(languages!=null&&languages.size()>0){ ci.language=languages.get(0); ci.languages=languages; }else{