Prevent NPE

This commit is contained in:
M66B 2022-10-16 11:41:51 +02:00
parent f89c077782
commit 6d754f31bf
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ public class FragmentDialogTranslate extends FragmentDialogBase {
private View _getView(int position, View view) {
DeepL.Language language = getItem(position);
if (language != null) {
if (language != null && language.icon != null && language.name != null) {
TextView tv = view.findViewById(android.R.id.text1);
Drawable icon = ContextCompat.getDrawable(context, language.icon);