From 15810147ac672f1c08c62672cb01fc4335a78052 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sun, 16 Feb 2014 23:13:19 -0800 Subject: Fix crash when going to download list --- src/github/daneren2005/dsub/fragments/DownloadFragment.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/github') diff --git a/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/src/github/daneren2005/dsub/fragments/DownloadFragment.java index d87d8432..0a146b33 100644 --- a/src/github/daneren2005/dsub/fragments/DownloadFragment.java +++ b/src/github/daneren2005/dsub/fragments/DownloadFragment.java @@ -504,8 +504,10 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe } if(downloadService != null) { MenuItem mediaRouteItem = menu.findItem(R.id.menu_mediaroute); - MediaRouteButton mediaRouteButton = (MediaRouteButton) mediaRouteItem.getActionView(); - mediaRouteButton.setRouteSelector(downloadService.getRemoteSelector()); + if(mediaRouteItem != null) { + MediaRouteButton mediaRouteButton = (MediaRouteButton) mediaRouteItem.getActionView(); + mediaRouteButton.setRouteSelector(downloadService.getRemoteSelector()); + } } } -- cgit v1.2.3