From 6c23d1c8f4009eec3e8278cfed22d097f57a97c5 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 22 Mar 2022 22:20:15 +0100 Subject: [PATCH] Prevent crash --- app/src/main/java/eu/faircode/email/EntityAnswer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EntityAnswer.java b/app/src/main/java/eu/faircode/email/EntityAnswer.java index b51323bb15..492adac97f 100644 --- a/app/src/main/java/eu/faircode/email/EntityAnswer.java +++ b/app/src/main/java/eu/faircode/email/EntityAnswer.java @@ -285,7 +285,7 @@ public class EntityAnswer implements Serializable { ssb.append(" host "); start = ssb.length(); - ssb.append(p.imap.host); + ssb.append(p.imap.host == null ? "?" : p.imap.host); ssb.setSpan(new StyleSpan(Typeface.BOLD), start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); @@ -307,7 +307,7 @@ public class EntityAnswer implements Serializable { ssb.append(" host "); start = ssb.length(); - ssb.append(p.smtp.host); + ssb.append(p.smtp.host == null ? "?" : p.smtp.host); ssb.setSpan(new StyleSpan(Typeface.BOLD), start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);