Skip to content

Commit

Permalink
Fix MediaManager not checking ContextExtensionsKt.getActivity for nul…
Browse files Browse the repository at this point in the history
…l value
  • Loading branch information
nielsvanvelzen committed Mar 28, 2022
1 parent b090868 commit 0a423e8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,8 @@ private void playNowInternal(Context context, List<BaseItemDto> items, int posit
if (shuffle) shuffleAudioQueue();
playFrom(position);

if (ContextExtensionsKt.getActivity(context).getClass() != AudioNowPlayingActivity.class) {
Activity activity = ContextExtensionsKt.getActivity(context);
if (activity != null && activity.getClass() != AudioNowPlayingActivity.class) {
Intent nowPlaying = new Intent(context, AudioNowPlayingActivity.class);
context.startActivity(nowPlaying);
} else {
Expand Down

0 comments on commit 0a423e8

Please sign in to comment.