Fix potential crashes

This commit is contained in:
tom79 2019-10-02 08:19:41 +02:00
parent e2edee4180
commit bbf0b3d135
1 changed files with 1 additions and 1 deletions

View File

@ -4845,7 +4845,7 @@ public class API {
JSONObject resobj = jsonArray.getJSONObject(i);
Status status = parseStatuses(context, resobj);
Status alreadyCached = new TimelineCacheDAO(context, db).getSingle(status.getId());
if (alreadyCached == null) {
if (alreadyCached == null && account !=null && account.getId() != null && account.getInstance() != null) {
new TimelineCacheDAO(context, db).insert(status.getId(), resobj.toString(), account.getId(), account.getInstance());
}
i++;