Fix nullpointer when trying to delete keys or resuming from key import. Uups...
This commit is contained in:
@@ -120,7 +120,8 @@ public class KeySectionedListAdapter extends SectionCursorAdapter<KeySectionedLi
|
||||
public long[] getSelectedMasterKeyIds() {
|
||||
long[] keys = new long[mSelected.size()];
|
||||
for(int i = 0; i < keys.length; i++) {
|
||||
if(!moveCursor(mSelected.get(i))) {
|
||||
int index = getCursorPositionWithoutSections(mSelected.get(i));
|
||||
if(!moveCursor(index)) {
|
||||
return keys;
|
||||
}
|
||||
|
||||
@@ -132,7 +133,8 @@ public class KeySectionedListAdapter extends SectionCursorAdapter<KeySectionedLi
|
||||
|
||||
public boolean isAnySecretKeySelected() {
|
||||
for(int i = 0; i < mSelected.size(); i++) {
|
||||
if(!moveCursor(mSelected.get(i))) {
|
||||
int index = getCursorPositionWithoutSections(mSelected.get(i));
|
||||
if(!moveCursor(index)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ public class RecyclerFragment<A extends RecyclerView.Adapter> extends Fragment {
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
setAdapter(null);
|
||||
//setAdapter(null);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user