From 0a37de8e2b9b4e3af19b70daf39aa9545612888b Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Tue, 14 Oct 2014 09:39:26 +0200 Subject: [PATCH] Fix NullPointerException --- .../info/nerull7/mysqlbrowser/ElementArrayAdapter.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nerull7/mysqlbrowser/ElementArrayAdapter.java b/app/src/main/java/info/nerull7/mysqlbrowser/ElementArrayAdapter.java index adc23ba..32388b5 100644 --- a/app/src/main/java/info/nerull7/mysqlbrowser/ElementArrayAdapter.java +++ b/app/src/main/java/info/nerull7/mysqlbrowser/ElementArrayAdapter.java @@ -33,7 +33,13 @@ public class ElementArrayAdapter extends ArrayAdapter { super(context, resource, fields); init(context, resource, fields); this.values = new ArrayList(); - this.values.addAll(values); // Copy + if(values!=null) { + this.values.addAll(values); // Copy + } else { + for(int i=0;i fields){