Null check for getSelectedEntries

This commit is contained in:
Dominik Schürmann 2014-10-03 13:37:49 +02:00
parent 228e5653f9
commit d5c6e430a5

View File

@ -110,7 +110,13 @@ public class ImportKeysListFragment extends ListFragment implements
} }
public ArrayList<ImportKeysListEntry> getSelectedEntries() { public ArrayList<ImportKeysListEntry> getSelectedEntries() {
return mAdapter.getSelectedEntries(); if (mAdapter != null) {
return mAdapter.getSelectedEntries();
} else {
Log.e(Constants.TAG, "Adapter not initialized, returning empty list");
return new ArrayList<ImportKeysListEntry>();
}
} }
/** /**