From 8e25f188c5d0cb04dcf56b864a11bd34c78e4642 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Fri, 26 Apr 2019 19:10:23 +0200 Subject: [PATCH] Fixed crash where recyclerAdapter is null Closes #3138 --- .../java/de/danoeh/antennapod/fragment/QueueFragment.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 1debab6a3..d19a9b2f3 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -272,7 +272,9 @@ public class QueueFragment extends Fragment { boolean newLockState = !UserPreferences.isQueueLocked(); UserPreferences.setQueueLocked(newLockState); getActivity().supportInvalidateOptionsMenu(); - recyclerAdapter.setLocked(newLockState); + if (recyclerAdapter != null) { + recyclerAdapter.setLocked(newLockState); + } if (newLockState) { Snackbar.make(getActivity().findViewById(R.id.content), R.string .queue_locked, Snackbar.LENGTH_SHORT).show();