From b1941d488c56f8332e722c298d10f14c7a706166 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 16 Jun 2018 22:41:19 +0200 Subject: catch NPE in AccountAdapter --- src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java index 37d15f782..01b432d65 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java @@ -6,6 +6,7 @@ import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.AsyncTask; +import android.support.annotation.NonNull; import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; @@ -43,8 +44,9 @@ public class AccountAdapter extends ArrayAdapter { this.showStateButton = true; } + @NonNull @Override - public View getView(int position, View view, ViewGroup parent) { + public View getView(int position, View view, @NonNull ViewGroup parent) { final Account account = getItem(position); if (view == null) { LayoutInflater inflater = (LayoutInflater) getContext() -- cgit v1.2.3