From 653d77bab2282a6f273f863b1a07fab7f03a1c85 Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Sat, 7 Sep 2019 13:14:16 +0200 Subject: [PATCH] fix crash in StatusBaseViewHolder --- .../com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java index 99841318d..662d345eb 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java @@ -507,7 +507,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder { private static CharSequence getAttachmentDescription(Context context, Attachment attachment) { String duration = ""; - if(attachment.getMeta().getDuration() != null && attachment.getMeta().getDuration() > 0) { + if(attachment.getMeta() != null && attachment.getMeta().getDuration() != null && attachment.getMeta().getDuration() > 0) { duration = formatDuration(attachment.getMeta().getDuration()) + " "; } if (TextUtils.isEmpty(attachment.getDescription())) {