diff options
author | ByteHamster <info@bytehamster.com> | 2019-04-26 19:10:23 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-04-26 19:10:27 +0200 |
commit | 8e25f188c5d0cb04dcf56b864a11bd34c78e4642 (patch) | |
tree | 478d6ec4ab83e4749cb61e724a7ff5500541b3cf /app | |
parent | 48ead285b3d465398b59d5296142f9a33ccd4835 (diff) | |
download | AntennaPod-8e25f188c5d0cb04dcf56b864a11bd34c78e4642.zip |
Fixed crash where recyclerAdapter is null
Closes #3138
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java | 4 |
1 files changed, 3 insertions, 1 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 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(); |