Prevent NPE

pull/209/head
M66B 2 years ago
parent f89c077782
commit 6d754f31bf

@ -154,7 +154,7 @@ public class FragmentDialogTranslate extends FragmentDialogBase {
private View _getView(int position, View view) { private View _getView(int position, View view) {
DeepL.Language language = getItem(position); 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); TextView tv = view.findViewById(android.R.id.text1);
Drawable icon = ContextCompat.getDrawable(context, language.icon); Drawable icon = ContextCompat.getDrawable(context, language.icon);

Loading…
Cancel
Save