@@ -62,7 +62,8 @@ public final class NavigationHelper {
6262 public static final String MAIN_FRAGMENT_TAG = "main_fragment_tag" ;
6363 public static final String SEARCH_FRAGMENT_TAG = "search_fragment_tag" ;
6464
65- private NavigationHelper () { }
65+ private NavigationHelper () {
66+ }
6667
6768 /*//////////////////////////////////////////////////////////////////////////
6869 // Players
@@ -111,18 +112,22 @@ public static <T> Intent getPlayerEnqueueIntent(@NonNull final Context context,
111112 public static void playOnMainPlayer (final AppCompatActivity activity ,
112113 @ NonNull final PlayQueue playQueue ) {
113114 final PlayQueueItem item = playQueue .getItem ();
114- assert item != null ;
115- openVideoDetailFragment (activity , activity .getSupportFragmentManager (),
116- item .getServiceId (), item .getUrl (), item .getTitle (), playQueue , false );
115+ if (item != null ) {
116+ openVideoDetailFragment (activity , activity .getSupportFragmentManager (),
117+ item .getServiceId (), item .getUrl (), item .getTitle (), playQueue ,
118+ false );
119+ }
117120 }
118121
119122 public static void playOnMainPlayer (final Context context ,
120123 @ NonNull final PlayQueue playQueue ,
121124 final boolean switchingPlayers ) {
122125 final PlayQueueItem item = playQueue .getItem ();
123- assert item != null ;
124- openVideoDetail (context ,
125- item .getServiceId (), item .getUrl (), item .getTitle (), playQueue , switchingPlayers );
126+ if (item != null ) {
127+ openVideoDetail (context ,
128+ item .getServiceId (), item .getUrl (), item .getTitle (), playQueue ,
129+ switchingPlayers );
130+ }
126131 }
127132
128133 public static void playOnPopupPlayer (final Context context ,
0 commit comments