diff options
author | ByteHamster <info@bytehamster.com> | 2019-09-09 17:59:35 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-09-09 17:59:35 +0200 |
commit | 6b79f740b207fc70d6d67253d883c4c2348d44df (patch) | |
tree | 694db63641fefec30afd4e4a03af496a7f8d1fcf /app/src/main/java/de/danoeh/antennapod | |
parent | 6dfff544e44a0e38b3a569f9f882701fbcbc21ef (diff) | |
download | AntennaPod-6b79f740b207fc70d6d67253d883c4c2348d44df.zip |
Fixed crash when clicking keep sorted on empty queue
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java index 4f07e1b59..9763f8f2d 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -378,8 +378,10 @@ public class QueueFragment extends Fragment { if (keepSortedNew) { SortOrder sortOrder = UserPreferences.getQueueKeepSortedOrder(); QueueSorter.sort(sortOrder, true); - recyclerAdapter.setLocked(true); - } else { + if (recyclerAdapter != null) { + recyclerAdapter.setLocked(true); + } + } else if (recyclerAdapter != null) { recyclerAdapter.setLocked(UserPreferences.isQueueLocked()); } getActivity().invalidateOptionsMenu(); |