From f67d5e260280f1f7c2b7a72e3c6d1aeaef3008cc Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 17 Feb 2021 12:04:00 +0100 Subject: [PATCH] Prevent crash --- app/src/main/java/eu/faircode/email/FragmentBase.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentBase.java b/app/src/main/java/eu/faircode/email/FragmentBase.java index 2881764a4a..dfd9c9930e 100644 --- a/app/src/main/java/eu/faircode/email/FragmentBase.java +++ b/app/src/main/java/eu/faircode/email/FragmentBase.java @@ -353,8 +353,10 @@ public class FragmentBase extends Fragment { View custom = actionbar.getCustomView(); TextView tvTitle = custom.findViewById(R.id.title); TextView tvSubtitle = custom.findViewById(R.id.subtitle); - tvTitle.setText(title == null ? getString(R.string.app_name) : title); - tvSubtitle.setText(subtitle); + if (tvTitle != null) + tvTitle.setText(title == null ? getString(R.string.app_name) : title); + if (tvSubtitle != null) + tvSubtitle.setText(subtitle); } } }