aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-06-16 22:41:19 +0200
committerChristian Schneppe <christian@pix-art.de>2018-06-16 22:41:19 +0200
commitb1941d488c56f8332e722c298d10f14c7a706166 (patch)
treebe6b2e13277ca36510968df4182fa893a13baca4
parent353a49fdea0753968f54dc36a185bd1d2b219929 (diff)
catch NPE in AccountAdapter
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java4
1 files changed, 3 insertions, 1 deletions
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<Account> {
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()