mirror of https://github.com/M66B/FairEmail.git
Prevent NPE
This commit is contained in:
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…
Reference in New Issue